By the way what would be more efficient, count(:all) or count(1)?
thanks
Rod
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, sen
Thanks, I am glad we are on the same page. Sorry, I did not see your
github post. I will check that right now.
Rod
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group
If you're calling count, it doesn't matter what select values you've
passed, since you're asking ActiveRecord to return an aggregate, not any
column values.
On Sun, Jun 1, 2014 at 9:19 AM, Rodrigo Lueneberg
wrote:
> Josh,
>
> If I remove the call to "select" how to specify which columns to sele
Josh,
If I remove the call to "select" how to specify which columns to select?
PS: You don't want Rails to select all using wildcard * as it will
affect
performance.
Thanks
Rod
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Gro
Rails introduced a breaking change to select and count being used together
in the same relation. Either remove your call to "select", since it is
unnecessary here, or call "count(:all)".
More info here: https://github.com/rails/rails/issues/15138
On Saturday, May 31, 2014 8:00:36 PM UTC-4, Ruby
5 matches
Mail list logo