>> clicks = Click.find(:all,:select=>"count(*) as count, date", :group=>"date")
=> [#<Click date: "2010-04-05">, #<Click date: "2010-04-06">, #<Click
date: "2010-04-07">]

>> clicks[0].count.class
=> String

Should this return a String?  I would think it would surely be a Fixnum.
Am I crazy?  Is this a bug in rails?

Anyone know a way to get around this?  I need to make it a Fixnum or
Float using count(*) in find.  Casting it using to_i after the fact will
not work in my scenario.  I need to this to be correct when it returns
the "clicks" array.
-- 
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to