acts_as_controller_for 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,9 @@ module ActsAsControllerFor
11
11
  class_variable_set :@@options, options
12
12
 
13
13
  # Load and authorize (via +cancan+ gem) if set to
14
- load_and_authorize_resource options[:load_and_authorize] if options[:load_and_authorize]
14
+ if options[:load_and_authorize]
15
+ load_and_authorize_resource(options[:load_and_authorize].is_a?(Hash) ? options[:load_and_authorize] : nil)
16
+ end
15
17
 
16
18
  # Define actions...
17
19
  include InstanceMethods
@@ -2,7 +2,7 @@ module ActsAsControllerFor
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 4
5
+ TINY = 5
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: acts_as_controller_for
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.4
5
+ version: 0.0.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jay Hayes