views:

25

answers:

1

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")
+6  A: 

order should be a symbol, :order => "expire_date DESC"

William
......... i am so stupid ...... thx dude ....
wizztjh
no problem. i have spent hours debugging and searching google for solutions to problems which came down to something as simple as this before. I think everyone has, so don't feel bad :)
William