Typo fix for unscope

This commit is contained in:
Amit Thawait 2014-02-18 11:26:54 -08:00
parent 33cb47ee48
commit b74490e4f2
2 changed files with 2 additions and 2 deletions

@ -46,7 +46,7 @@
class User < ActiveRecord::Base
default_scope { where state: 'pending' }
scope :active, -> { unescope(where: :state).where(state: 'active') }
scope :active, -> { unscope(where: :state).where(state: 'active') }
scope :inactive, -> { rewhere state: 'inactive' }
end

@ -315,7 +315,7 @@ To get the previous behavior it is needed to explicitly remove the
```ruby
class User < ActiveRecord::Base
default_scope { where state: 'pending' }
scope :active, -> { unescope(where: :state).where(state: 'active') }
scope :active, -> { unscope(where: :state).where(state: 'active') }
scope :inactive, -> { rewhere state: 'inactive' }
end