Reputation: 29514
i have a line in my model in rails 2
named_scope :ordered, lambda {|*args| {:order => (args.first || 'created_at DESC')} }
how to change this to rails3
Upvotes: 0
Views: 37
Reputation: 124439
scope :ordered, lambda { |*args|
order(args.first || 'created_at DESC')
}
Upvotes: 1