Permalink
Browse files

Merge pull request #14098 from Amit-Thawait/master

Typo fix for unscope [ci skip]
  • Loading branch information...
2 parents 33cb47e + b74490e commit 5dc6bf5fbcb70b330edff8da257607acd1760805 @arthurnn arthurnn 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 5dc6bf5

Please sign in to comment.