diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb index e03777b5bb..4193083f88 100644 --- a/actionpack/lib/action_controller/metal/strong_parameters.rb +++ b/actionpack/lib/action_controller/metal/strong_parameters.rb @@ -196,7 +196,7 @@ def require(key) # You may declare that the parameter should be an array of permitted scalars # by mapping it to an empty array: # - # params.permit(:tags => []) + # params.permit(tags: []) # # You can also use +permit+ on nested parameters, like: # @@ -409,10 +409,10 @@ def hash_filter(params, filter) return unless value if filter[key] == [] - # Declaration {:comment_ids => []}. + # Declaration { comment_ids: [] }. array_of_permitted_scalars_filter(params, key) else - # Declaration {:user => :name} or {:user => [:name, :age, {:adress => ...}]}. + # Declaration { user: :name } or { user: [:name, :age, { adress: ... }] }. params[key] = each_element(value) do |element| if element.is_a?(Hash) element = self.class.new(element) unless element.respond_to?(:permit)