When user requsts a record, rails will put everything into xml output. How to remove some junk data? 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 -~----------~----~----~----~------~----~------~--~---
If you can''t clear out enough "junk" with the to_xml options: http://api.rubyonrails.org/classes/ActiveRecord/XmlSerialization.html#M000910 then override to_xml on your model to produce the xml you want... probably with builder. You can also make a builder rxml template and have the controller render that instead. b Datou wrote:> When user requsts a record, rails will put everything into xml output. > How to remove some junk data? > > 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 -~----------~----~----~----~------~----~------~--~---
aha, i can use "kip_instruct => true, :except => [ ... ]". Thank you very much!! On May 13, 4:06 pm, Ben Munat <bmu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> If you can''t clear out enough "junk" with the to_xml options: > > http://api.rubyonrails.org/classes/ActiveRecord/XmlSerialization.html... > > then override to_xml on your model to produce the xml you want... > probably with builder. You can also make a builder rxml template and > have the controller render that instead. > > b > > Datou wrote: > > When user requsts a record, rails will put everything into xml output. > > How to remove some junk data? > > > 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 -~----------~----~----~----~------~----~------~--~---