diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-03-09 21:56:05 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-03-09 21:56:05 -0300 |
commit | 3d04d726fde4352795204f819ff4821f8991f42e (patch) | |
tree | afa7557301edbddc6bd4998f26ce6e1662b9907b /activemodel | |
parent | 10c3304db6fbb7d7b04c6651a793927fcb6e201a (diff) | |
download | rails-3d04d726fde4352795204f819ff4821f8991f42e.tar.gz rails-3d04d726fde4352795204f819ff4821f8991f42e.tar.bz2 rails-3d04d726fde4352795204f819ff4821f8991f42e.zip |
Remove Array#wrap usage in AMo serialization
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/serialization.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/serialization.rb b/activemodel/lib/active_model/serialization.rb index efc507c168..866659e6fd 100644 --- a/activemodel/lib/active_model/serialization.rb +++ b/activemodel/lib/active_model/serialization.rb @@ -1,6 +1,5 @@ require 'active_support/core_ext/hash/except' require 'active_support/core_ext/hash/slice' -require 'active_support/core_ext/array/wrap' module ActiveModel # == Active Model Serialization @@ -128,7 +127,7 @@ module ActiveModel return unless include = options[:include] unless include.is_a?(Hash) - include = Hash[Array.wrap(include).map { |n| n.is_a?(Hash) ? n.to_a.first : [n, {}] }] + include = Hash[Array(include).map { |n| n.is_a?(Hash) ? n.to_a.first : [n, {}] }] end include.each do |association, opts| |