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
|
-
|
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
|