Reputation: 7003
I have this bit of code:
@products = Product.order(id: :desc, :limit => 7)
Which returns the following error:
Direction should be :asc or :desc
It does work, however, if I set only one of those limiters. So what's the correct way of adding more than one helper?
Upvotes: 0
Views: 44
Reputation: 124429
You probably want this:
@products = Product.order(id: :desc).limit(7)
Upvotes: 2