-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
I was going to just write a patch myself but the code is a little more involved that I expected. This would be super-amazing if you could include fields from included related models. For example, if had a Message model that belonged to a user, I'd love to be able to do something like:
messages.includes(:user)[{user: :name}, :text]
This would give me the name field from the User model and the text field from the Message model. I'd even be happy just to take SQL-style table dot notation:
messages.includes(:user)['users.name', :text]
What do you think?
Metadata
Metadata
Assignees
Labels
No labels