File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
lib/declarative_authorization Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -471,6 +471,10 @@ def all_filter_access_permissions # :nodoc:
471
471
# See filter_access_to on details. By default, with no +nested_in+,
472
472
# +no_attribute_check+ is set to all collections. If +nested_in+ is given
473
473
# +no_attribute_check+ is empty by default.
474
+ # [:+strong_parameters+]
475
+ # If set to true, relies on controller to provide instance variable and
476
+ # create new object in :create action. Set true if you use strong_params
477
+ # and false if you use protected_attributes.
474
478
#
475
479
def filter_resource_access ( options = { } )
476
480
options = {
@@ -489,6 +493,7 @@ def filter_resource_access(options = {})
489
493
:strong_parameters => nil
490
494
} . merge ( options )
491
495
options . merge! ( { :strong_parameters => true } ) if Rails . version >= '4' && options [ :strong_parameters ] == nil
496
+ options . merge! ( { :strong_parameters => false } ) if Rails . version < '4' && options [ :strong_parameters ] == nil
492
497
493
498
new_actions = actions_from_option ( options [ :new ] ) . merge (
494
499
actions_from_option ( options [ :additional_new ] ) )
You can’t perform that action at this time.
0 commit comments