Skip to content

Commit

Permalink
Fix stffn#204, allow :additional_collection to work with strong params
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocksy authored and urkle committed Dec 29, 2018
1 parent 13bc25b commit 99f7280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/declarative_authorization/in_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ def filter_resource_access(options = {})
actions_from_option(options[:additional_collection])
)

no_attribute_check_actions = options[:strong_parameters] ? actions_from_option(options[:collection]).merge(actions_from_option([:create])) : collections
no_attribute_check_actions = options[:strong_parameters] ? collections.merge(actions_from_option([:create])) : collections

options[:no_attribute_check] ||= no_attribute_check_actions.keys unless options[:nested_in]

Expand Down

0 comments on commit 99f7280

Please sign in to comment.