1
0
Fork 0
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:
Rafael Mendonça França 2013-08-05 18:27:46 -03:00
parent d86ccec097
commit 9281adc64a

View file

@ -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