Re: [Rails-core] Suggestion: use `select` values if `pluck` called with no args

68 views
Skip to first unread message

Rafael Mendonça França

unread,
Nov 18, 2012, 9:10:59 PM11/18/12
to rubyonra...@googlegroups.com

What happens if you call pluck without any select value?

I think this is a good addition to the Rails code base. Mind to open a pull request?


Rafael Mendonça França
http://twitter.com/rafaelfranca
https://github.com/rafaelfranca



On Thu, Nov 15, 2012 at 10:19 AM, Roman <broil...@gmail.com> wrote:
I suggest that if you don't pass any args to ActiveRecord#pluck, it would use the select values. This follows along well with the way other AR::Calculations work. As an extra benefit we would be able to pluck virtual columns.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/Tlb8yXzd4tsJ.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-co...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.

Roman

unread,
Dec 16, 2012, 8:54:53 AM12/16/12
to rubyonra...@googlegroups.com
Hi Rafael, somehow I didn't get a notification about your answer and thought nobody replied.

Will need to think about this more.
Reply all
Reply to author
Forward
0 new messages