I'd like to knw how to count the number of trues or falses a boolean
in my model contains...
create_table :opinions do |t|
In this migration... if :agree is true... that means that the user,
for instance, agrees and if :agree is false, the user disagrees...
I'm trying o calculate is as follows....
o = Opinion.new
o.agree = true
And then... When I do this...
it returns 1 wich is good...
But as soon as I want to know the number of Trues or Falses... doesnt
Opinion.count( :conditions => "agree == true" )
please somebody help me out with this....
Is there a way of counting the number of boolean values in your