In my rails 4 application, a client (clients table) can have many projects (projects table). I have a column called name in each table. I am trying to write a
name
To get both project table name and client name you can do like below query
Project.joins(:client).pluck(:name,:'clients.name')