One little pet peeve of mine is that there is no way (afaik) to just add 
additional columns to the select clause of a query. Like for example if I'm 
joining and want a count or aggregate off the join table:

User.joins(:answers)
       .select('users.*','AVG(answers.score) AS average_score')


What I would really want to do is just add this to the existing select 
values of the scope:

User.joins(:answers)
       .select_also('AVG(answers.score) AS average_score')

*Is this a worthwhile feature? *

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-core/a6c37abb-1b91-4eea-978e-5a483c2e30a7%40googlegroups.com.

Reply via email to