aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-01-20 21:58:24 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-01-20 22:03:25 -0200
commit5a69fe724e50377f13dc107733b765a53fc0c799 (patch)
treedc8c63df96d8560ab7eadfc327e8896ac6addac1 /actionpack
parentf12f08d61fcc4620632f21330916b4c5809b9da3 (diff)
downloadrails-5a69fe724e50377f13dc107733b765a53fc0c799.tar.gz
rails-5a69fe724e50377f13dc107733b765a53fc0c799.tar.bz2
rails-5a69fe724e50377f13dc107733b765a53fc0c799.zip
Use 1.9 hash style in docs/comments [ci skip]
Diffstat (limited to 'actionpack')
-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)