Forum: Ruby on Rails How to remove some data form REST xml output?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Datou (Guest)
on 2007-05-13 09:51
(Received via mailing list)
When user requsts a record, rails will put everything into xml output.
How to remove some junk data?

Ben M. (Guest)
on 2007-05-13 12:07
(Received via mailing list)
If you can't clear out enough "junk" with the to_xml options:

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.

Datou (Guest)
on 2007-05-13 16:26
(Received via mailing list)
aha, i can use "kip_instruct => true, :except => [ ... ]".

Thank you very much!!
This topic is locked and can not be replied to.