我的帖子模型中有这个范围
scope :tynewydd_posts, :include => :department, :conditions => {"departments.name" => "Ty Newydd"}
我想按照创建的顺序对返回的结果进行排序,所以最新的帖子优先
我试过
scope :tynewydd_posts, :include => :department, :conditions => {"departments.name" => "Ty Newydd"}.order("posts.created_at DESC")
但我得到未定义的方法顺序:hash,所以我想我不能在这里使用这个方法?