rails/rails — pull request #10169 by Nerian (2013-04-10 20:24:51+00:00)
Title: Make `.select()` query method accept a hash option for stating field selection on joined tables. 

Hi,

The `.select` query method accepts multiple arguments. I added that when one of those arguments is a Hash, the key would be understood as the name of a table and each of its values as fields of said table.

Example:

```
User.joins(:posts).select(:name, posts: [:id, :title, :body])
# => SELECT name, posts.id, posts.title, posts.body FROM "users" INNER JOIN "posts" ON "posts"."user_id" = "users"."id"
```

Let me know how can I help you to get this merged.

Thanks.