Railsのdefault_scopeは悪だ!(default_scope is evil) ということらしいRubyRailsActiveRecord Rails Best Practiceのサイトを見ていたら、結構あおり気味なタイトルの記事があった。 default_scope is evil | Rails Best Practices 要約すると、Rails(ActiveRecord)の default_scope は2つの理由から使うべきではないとのことです。 default_scopeのオーバライドができない モデルをイニシャライズするときにdefault_scopeの副作用が影響する サンプルコードもあったので自分の環境でも試してみました。 以下の環境で試してみました。 Rails4.1.5 Ruby2.1.2 ベースとなるモデルは以下の様なUserクラスがあると想定(def