ruby - Rails association with "root" params -
what best way found "root" params of called method in rails?
user.first.comments # => [#<comment id: "1", name: "first comment" ... and need this:
user.first.comments #<user id:1, name:"first user", comments: [ #<comment id: "1", name: "first comment" ..., #<comment ... ] needed serialization.. thank you.
you know, problem has nothing includes. whether user's comments retrieved n + 1 query or not irrelevant.
i think need rabl. i've used , it's awesome.
Comments
Post a Comment