class Host
include Virtus
class Guest
include Virtus
attribute :one, String
end
attribute :guest, Guest
end
attrs = {:guest => {:one => "hi!}}
Host.new(attrs).attributes != attrs #because h.attributes[:guest] => #<Host::Guest> rather than {:one => "hi!"}
I'm not sure there's use cases for this "shallow" attributes behavior, but a "deep_attributes" method would be helpful.
Consider:
I'm not sure there's use cases for this "shallow" attributes behavior, but a "deep_attributes" method would be helpful.