rails 2.3.4, sqlite3
I\'m trying this
Production.find(:all, :conditions => ["time > ?", start_time.utc], :order => "time D
It is usually a bad idea to use reserved words without surrounding quotes. time
is a built-in function in SQLite, try using the following instead and better get rid of the ambiguity in the first place:
Production.find(:all,
:conditions => ["`time` > ?", start_time.utc],
:order => "`time` DESC",
:limit => 100)
UPD: The problem seems to have appeared on SO:
Rails Active Record find(:all, :order => ) issue