Typo fix for unscope
This commit is contained in:
parent
33cb47ee48
commit
b74490e4f2
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user