default_scope 排序的使用

在以前的版本使用default_scope:default_scope :order => 'title' 现在使用rails4的时候报错,

参考(hellolucky's blog)http://blog.hellolucky.info/articles/ruby-on-rails-rails4-learning-experience-finishing-rails-4-zombie-outlaws-1/

现在是这么用的default_scope {order (:title)}

你可能感兴趣的:(Blog,title)