Guys Supposing I have three models Company has_many :people Person has_many :addresses Shouldn''t this work? a_company.to_xml(:include => {:people => :addresses}) I get this exception: TypeError: can''t convert Symbol into Hash from /Users/rodrigo/Documents/Work/Wellknown/Webapp/vendor/rails/ activerecord/lib/active_record/serialization.rb:66:in `merge'' from /Users/rodrigo/Documents/Work/Wellknown/Webapp/vendor/rails/ activerecord/lib/active_record/serialization.rb:66:in `add_includes'' from /Users/rodrigo/Documents/Work/Wellknown/Webapp/vendor/rails/ activerecord/lib/active_record/serialization.rb:56:in `each'' from /Users/rodrigo/Documents/Work/Wellknown/Webapp/vendor/rails/ activerecord/lib/active_record/serialization.rb:56:in `add_includes'' from /Users/rodrigo/Documents/Work/Wellknown/Webapp/vendor/rails/ activerecord/lib/active_record/serializers/xml_serializer.rb:267:in `serialize'' from /opt/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/ xmlbase.rb:134:in `call'' from /opt/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/ xmlbase.rb:134:in `_nested_structures'' from /opt/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/ xmlbase.rb:58:in `method_missing'' from /opt/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/ xmlbase.rb:31:in `tag!'' from /Users/rodrigo/Documents/Work/Wellknown/Webapp/vendor/rails/ activerecord/lib/active_record/serializers/xml_serializer.rb:264:in `serialize'' from /Users/rodrigo/Documents/Work/Wellknown/Webapp/vendor/rails/ activerecord/lib/active_record/serialization.rb:93:in `to_s'' from /Users/rodrigo/Documents/Work/Wellknown/Webapp/vendor/rails/ activerecord/lib/active_record/serializers/xml_serializer.rb:156:in `to_xml'' from (irb):23 Any ideas? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---