提交 b74490e4 编写于 作者: A Amit Thawait

Typo fix for unscope

上级 33cb47ee
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册