Overriding to_xml for collection of ActiveRecord objects
- by Chirantan
Okay, I know you can override the to_xml method for a single instance of ActiveRecord object and it works just fine for me. But how would I go about overriding the to_xml method for collection of objects?
Suppose for Task model instance, I implemented to_xml which looks like this.
def to_xml
super(:methods => [:tag_list], :include =>…