Hi! I''d like to know how to (most easily) ignore some elements from produced XML .. for example: @people.to_xml produces: <person> <id>2</id> <name>bob</name> <street>carson street</street> </person> ... How can I *not* produce the "ID" field for example? Thank you! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Dec 12, 2007 4:22 PM, D. Krmpotic <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi! > > I''d like to know how to (most easily) ignore some elements from produced > XML .. > > for example: @people.to_xml produces: > > <person> > <id>2</id> > <name>bob</name> > <street>carson street</street> > </person> > ... > > How can I *not* produce the "ID" field for example? > > Thank you! > -- > Posted via http://www.ruby-forum.com/. > >@people.to_xml(:except => [:id]) http://api.rubyonrails.org/classes/ActiveRecord/Serialization.html#M001113 Jason --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Great! I was guessing it''s :ignore.. the problem is that when I start gem_server, I don''t see the RDOC for rails.. (the directory is empty).. I tried "gem rdoc rails".. it prbably executes, but it doesn''t do nothing.. so I refused to read the docs until I have it set u locally.. :) it would be great if anyone could give me instruction on how to install the rails docs.. (most of the other gems have RDOC link enabled, but no rails).. byr and thank you! Jason Roelofs wrote:> On Dec 12, 2007 4:22 PM, D. Krmpotic <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > >> <name>bob</name> >> > @people.to_xml(:except => [:id]) > > http://api.rubyonrails.org/classes/ActiveRecord/Serialization.html#M001113 > > Jason-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---