Record.count('whatever = whatever') will be deprecated in Ra

Ruboids:

Excuse the newbescence, but “count” is impossible to Google for. (Darn
these
clear and expressive interfaces!)

The deprecation warning says something about count(column_name,
options). So
what’s the simplest translation from Record.count(‘whatever = whatever’)
to
a .count() in … whatever notation?


Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!

On 1/20/07, Phlip [email protected] wrote:

Ruboids:

Excuse the newbescence, but “count” is impossible to Google for. (Darn these
clear and expressive interfaces!)

The deprecation warning says something about count(column_name, options). So
what’s the simplest translation from Record.count(‘whatever = whatever’) to
a .count() in … whatever notation?

count :all, :conditions => …


Rick O.
http://weblog.techno-weenie.net
http://mephistoblog.com

Rick O. wrote:

The deprecation warning says something about count(column_name, options).
So
what’s the simplest translation from Record.count(‘whatever = whatever’)
to
a .count() in … whatever notation?

count :all, :conditions => …

For future reference, that wouldn’t have been enough for people like me
who
shouldn’t be allowed near a computer.

Fortunately, I just found this:

Person.count(:all, :conditions => “age > 26”) # Performs a COUNT()
(:all is an alias for '
’)


Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs