Phlip
2007-Jan-20 20:45 UTC
Record.count(''whatever = whatever'') will be deprecated in Rails 2.0
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!!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rick Olson
2007-Jan-20 20:48 UTC
Re: Record.count(''whatever = whatever'') will be deprecated in Rails 2.0
On 1/20/07, Phlip <phlip2005-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 Olson http://weblog.techno-weenie.net http://mephistoblog.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Phlip
2007-Jan-20 21:07 UTC
Re: Record.count(''whatever = whatever'') will be deprecated in Rails 2.0
Rick Olson 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!!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---