Permalink
Browse files

Typo fix for unscope

  • Loading branch information...
1 parent 33cb47e commit b74490e4f25ef26de3906cd5cd9ca0193e873372 @Amit-Thawait Amit-Thawait committed Feb 18, 2014
Showing with 2 additions and 2 deletions.
  1. +1 −1 activerecord/CHANGELOG.md
  2. +1 −1 guides/source/upgrading_ruby_on_rails.md
@@ -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

0 comments on commit b74490e

Please sign in to comment.