Why can't I use order in find method?
In script/console
Storage.find(:all , :conditions => "item_id=1" , order => "expire_date DESC")
I get
NameError: undefined local variable or method `order' for #<Object:0xb7761954>
from (开发者_运维问答irb):5
But it works when I use
Storage.find(:all , :conditions => "item_id=1")
order
should be a symbol, :order => "expire_date DESC"
精彩评论