Remove Array#wrap usage in AMo serialization

This commit is contained in:
Carlos Antonio da Silva 2012-03-09 21:56:05 -03:00
parent 10c3304db6
commit 3d04d726fd
1 changed files with 1 additions and 2 deletions

View File

@ -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|