aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/strong_parameters.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/metal/strong_parameters.rb')
-rw-r--r--actionpack/lib/action_controller/metal/strong_parameters.rb6
1 files changed, 3 insertions, 3 deletions
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 @@ module ActionController
# 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 @@ module ActionController
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)