mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove deprecated branch on the scope method.
The deprecation message was removed on 50cbc03d18
but the code was not.
This commit is contained in:
parent
d86ccec097
commit
9281adc64a
1 changed files with 2 additions and 6 deletions
|
@ -142,12 +142,8 @@ module ActiveRecord
|
|||
extension = Module.new(&block) if block
|
||||
|
||||
singleton_class.send(:define_method, name) do |*args|
|
||||
if body.respond_to?(:call)
|
||||
scope = all.scoping { body.call(*args) }
|
||||
scope = scope.extending(extension) if extension
|
||||
else
|
||||
scope = body
|
||||
end
|
||||
scope = all.scoping { body.call(*args) }
|
||||
scope = scope.extending(extension) if extension
|
||||
|
||||
scope || all
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue