aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/params_wrapper.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-01-05 17:18:54 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-01-05 17:57:56 -0300
commit2ed17977acb288310d5455f1d716faba2202ba0c (patch)
treeac16c18f32c5f047785645366408185070051af7 /actionpack/lib/action_controller/metal/params_wrapper.rb
parent56715c49d4788db81f2fd5e6920b751c8da2352b (diff)
downloadrails-2ed17977acb288310d5455f1d716faba2202ba0c.tar.gz
rails-2ed17977acb288310d5455f1d716faba2202ba0c.tar.bz2
rails-2ed17977acb288310d5455f1d716faba2202ba0c.zip
Change more Array.wrap to Kernel#Array
Diffstat (limited to 'actionpack/lib/action_controller/metal/params_wrapper.rb')
-rw-r--r--actionpack/lib/action_controller/metal/params_wrapper.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/metal/params_wrapper.rb b/actionpack/lib/action_controller/metal/params_wrapper.rb
index 5c28a8074f..fa760f2658 100644
--- a/actionpack/lib/action_controller/metal/params_wrapper.rb
+++ b/actionpack/lib/action_controller/metal/params_wrapper.rb
@@ -1,7 +1,6 @@
require 'active_support/core_ext/class/attribute'
require 'active_support/core_ext/hash/slice'
require 'active_support/core_ext/hash/except'
-require 'active_support/core_ext/array/wrap'
require 'active_support/core_ext/module/anonymous'
require 'action_dispatch/http/mime_types'
@@ -43,9 +42,9 @@ module ActionController
# wrap_parameters :person, :include => [:username, :password]
# end
#
- # On ActiveRecord models with no +:include+ or +:exclude+ option set,
+ # On ActiveRecord models with no +:include+ or +:exclude+ option set,
# if attr_accessible is set on that model, it will only wrap the accessible
- # parameters, else it will only wrap the parameters returned by the class
+ # parameters, else it will only wrap the parameters returned by the class
# method attribute_names.
#
# If you're going to pass the parameters to an +ActiveModel+ object (such as
@@ -180,9 +179,9 @@ module ActionController
controller_name.singularize
end
- options[:include] = Array.wrap(options[:include]).collect(&:to_s) if options[:include]
- options[:exclude] = Array.wrap(options[:exclude]).collect(&:to_s) if options[:exclude]
- options[:format] = Array.wrap(options[:format])
+ options[:include] = Array(options[:include]).collect(&:to_s) if options[:include]
+ options[:exclude] = Array(options[:exclude]).collect(&:to_s) if options[:exclude]
+ options[:format] = Array(options[:format])
self._wrapper_options = options
end