2014-03-09から1日間の記事一覧
仕様が変わり、default_scopeの内容が上書きされずにチェインされるようになった。 4.1より前 class User < ActiveRecord::Base default_scope { where state: 'pending' } scope :active, -> { where state: 'active' } scope :inactive, -> { where state:…
仕様が変わり、default_scopeの内容が上書きされずにチェインされるようになった。 4.1より前 class User < ActiveRecord::Base default_scope { where state: 'pending' } scope :active, -> { where state: 'active' } scope :inactive, -> { where state:…