I have an association one to many from foo and bar.
i do a foo.to_json(:include => :bar) but i want to display not all the rows of bar, but only the last, how to do?
I have an association one to many from foo and bar.
i do a foo.to_json(:include => :bar) but i want to display not all the rows of bar, but only the last, how to do?