0
我有一条线在我的模型导轨2在导轨3愚蠢的简单问题
named_scope:ordered,lambda {| * args | {:为了=>(args.first || 'created_at DESC')}}
如何改变这种到Rails3中
我有一条线在我的模型导轨2在导轨3愚蠢的简单问题
named_scope:ordered,lambda {| * args | {:为了=>(args.first || 'created_at DESC')}}
如何改变这种到Rails3中
scope :ordered, lambda { |*args|
order(args.first || 'created_at DESC')
}