Wondering with the upgrade to Arel, if ActiveRecord yet supports an automated way to select in the columns from joined tables, without having to explicitly list them in a select clause.
Given I'm joining the users
table to posts
, Would like to be able to do something like this in a more succinct manner:
scope :select_user,
select("posts.*, " + User.columns.map{|c|
"users.#{c.name} user_#{c.name}"}.join(','))
So, I want to automatically select the fields from user so that I get say
Post.joins(:user).select_user.first.user_name