action-hero 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6057b9222d7571f299d78e40cadd431c2ddbcaa3
4
- data.tar.gz: ff3b6a775b8cd1f562de753884d1bbc243642c00
3
+ metadata.gz: 4dd7aab8d4cf9e0b6e1f11fe7600ca7b46456cb6
4
+ data.tar.gz: ce28459313a2dc21aaead7e17d64c60d1a48a65b
5
5
  SHA512:
6
- metadata.gz: beb75d606792a82bfceb31f638512da2d1d050c3b9cf98d1a0e5d94fd7fa37a1ea84662673e4e3062199eb4501b1d5e87bf4383c0267dcbf9b5d8c9ac399c34f
7
- data.tar.gz: 13bd2fd605606fe06bcac1e5b1f779b64ee9b67b22b444d695094c41ce43f58e90f7390580204f46c73ae4647faf6cc4ab339c2056c8953c935316d6b58d88a2
6
+ metadata.gz: cd25f0203bf2f9b118fadfcb4cbe0f8d3637869a2f194c831b9662145cd4edca5d4360a7787764042229ba218c3026ef6650e012a79b6659df1265954009ef68
7
+ data.tar.gz: 029453533f3667fd3866d2cafcfa2a81109c080eaa435e18453fc75bb5f714475bbcef38c0218b16936bb92caf269605f47e90cfb353747c6b5164adb15b47d9
@@ -6,6 +6,8 @@ module ActionHero
6
6
 
7
7
  extend ActiveSupport::Concern
8
8
 
9
+ include Rails.application.routes.url_helpers
10
+
9
11
  included do
10
12
 
11
13
  extend Forwardable
@@ -43,6 +45,7 @@ module ActionHero
43
45
  name = args.first.is_a?( Symbol ) ? args.first : (raise NotImplementedError)
44
46
  value = args.last
45
47
  instance_variable_set "@#{name}", value
48
+ self.class.send( :define_method, name, lambda { instance_variable_get "@#{name}" } )
46
49
  controller.send :expose, *args
47
50
  end
48
51
 
@@ -5,7 +5,7 @@ module ActionHero
5
5
  :action_name
6
6
 
7
7
  def initialize( options )
8
- @module_name = normalize_controller( options )
8
+ @module_name = normalize_controller( options ).pluralize
9
9
  @action_name = options[:action_name]
10
10
  end
11
11
 
@@ -1,5 +1,5 @@
1
1
  module ActionHero
2
2
 
3
- VERSION = "0.2.1"
3
+ VERSION = "0.3.0"
4
4
 
5
5
  end
@@ -32,7 +32,7 @@ module ActionDispatch
32
32
  controller_const = nil
33
33
  ActionHero.configuration.implicit_controllers.each do |regex, controller|
34
34
  if regex.match( "/#{controller_param}" )
35
- controller_const = controller
35
+ controller_const = controller.constantize
36
36
  break
37
37
  end
38
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action-hero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - C. Jason Harrelson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-08 00:00:00.000000000 Z
11
+ date: 2013-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler