KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have an array of model objects that have an owner method. This method needs a parameter to be passed into it to work. I need to serialize the model objects to json and include the value of the owner method. How would I go about passing the parameter into the to_json method I currently use the objects.to_json(:methods => :owner) to include the owner method but as I am not passing the parameter it does not work.
Tags (comma-separated)
Save Edits
Cancel