I just upgrading from Rails 3 to 3.1, and am getting this error:
NoMethodError (undefined method `<=>' for #<Mysql::Time:2011-01-12 00:00:00>):
on this line:
payments = Payment.all( :select => 'date(created_at) as day, amount', :order => 'created_at',
:conditions => ["status = ?"], 1)
payments.group_by(&:day).sort
Any ideas how to fix?
Fixed it. I switched to the mysql2 gem (https://github.com/brianmario/mysql2), and that resolved the issue while keeping performance.