aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/scoping
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-08-05 18:27:46 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-08-05 18:27:46 -0300
commit9281adc64acc5071c1d0d699158c97eae8430810 (patch)
treeb471be866dc8a17c872999bff62070c0b9e3a1ad /activerecord/lib/active_record/scoping
parentd86ccec0979ad60c2430a40864e90dc2f14fd2cb (diff)
downloadrails-9281adc64acc5071c1d0d699158c97eae8430810.tar.gz
rails-9281adc64acc5071c1d0d699158c97eae8430810.tar.bz2
rails-9281adc64acc5071c1d0d699158c97eae8430810.zip
Remove deprecated branch on the scope method.
The deprecation message was removed on 50cbc03d18c5984347965a94027879623fc44cce but the code was not.
Diffstat (limited to 'activerecord/lib/active_record/scoping')
-rw-r--r--activerecord/lib/active_record/scoping/named.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/scoping/named.rb b/activerecord/lib/active_record/scoping/named.rb
index 7c51aa6979..2a5718f388 100644
--- a/activerecord/lib/active_record/scoping/named.rb
+++ b/activerecord/lib/active_record/scoping/named.rb
@@ -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