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 committed Jul 15, 2015
1 parent 45e91af commit d43677d
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 @@ -507,7 +507,7 @@ def filter_resource_access(options = {})
collections = actions_from_option(options[:collection]).merge(
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 d43677d

Please sign in to comment.