2017/04/01分のコミットです。
CHANGELOGへの追加はありませんでした。
Add default_scope note to AR guide [ci skip]
rails guideのActive Record Query Interfaceの修正です。
Applying a default scopeの項に、scope argumentにArrayを渡した場合とHashを渡した場合の挙動の違いについての説明を追加しています。
class Client < ApplicationRecord default_scope { where(active: true) } end Client.new # => #<Client id: nil, active: true> Client.unscoped.new # => #<Client id: nil, active: nil> class Client < ApplicationRecord default_scope { where("active = ?", true) } end Client.new # => #<Client id: nil, active: nil>