Well, the matter is quite complicated in fact. And I can't happen to
make render :json work for it does not render everything in an object
(at least, not something you add via instance_variable_set.
I have an object.
This object is joint with another object.
The two should be rendered in the same json object, but I figured that
would not be possible, so I rendered an array, containing themselves an
array with the first and the second object.
In some case, some objects have children : I'd like to render the array
of children in the same fashion (right after the object it concerns).
I can't think of a way to make that work without using a view.
--
Posted via http://www.ruby-forum.com/.
--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment