Add more documentation for #pluck method usage (multiple tables)
53 views
Skip to first unread message
Jędrek Domański
unread,
Jul 13, 2018, 2:17:32 PM7/13/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Documentation
Hi,
I noticed using the Active Record #pluck method you are not limited to selecting multiple fields from a single table but also from multiple tables. In fact, you can do more than "selecting" multiple fields from multiple tables.
I spent a lot of time pulling my hair wondering how to select multiple fields from multiple tables in the most efficient way and ended up doing a lot of research in the internet and the source code. I suggest adding this to the Rails Query Interface documentation on #pluck method http://guides.rubyonrails.org/active_record_querying.html#pluck to save other people's time.
Jędrek
Xavier Noria
unread,
Aug 18, 2018, 11:50:56 AM8/18/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message