How to remove some data form REST xml output?

When user requsts a record, rails will put everything into xml output.
How to remove some junk data?

Thanks!

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

aha, i can use “kip_instruct => true, :except => [ … ]”.

Thank you very much!!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs