Making include_associations! a public API

This commit is contained in:
Yehuda Katz 2012-01-11 20:03:48 -07:00
parent 573be9302d
commit fb6af2efbb

View File

@ -366,16 +366,16 @@ module ActiveModel
# object without the root.
def serializable_hash
node = attributes
if _embed
_associations.each do |attr, klass|
include! attr, :node => node
end
end
include_associations!(node) if _embed
node
end
def include_associations!(node)
_associations.each do |attr, klass|
include! attr, :node => node
end
end
def include!(name, options={})
hash = options[:hash] || @options[:hash]
node = options[:node]