Skip to content
This repository
Browse code

Remove deprecated branch on the scope method.

The deprecation message was removed on 50cbc03 but the code was not.
  • Loading branch information...
commit 9281adc64acc5071c1d0d699158c97eae8430810 1 parent d86ccec
Rafael Mendonça França authored August 05, 2013
8  activerecord/lib/active_record/scoping/named.rb
@@ -142,12 +142,8 @@ def scope(name, body, &block)
142 142
           extension = Module.new(&block) if block
143 143
 
144 144
           singleton_class.send(:define_method, name) do |*args|
145  
-            if body.respond_to?(:call)
146  
-              scope = all.scoping { body.call(*args) }
147  
-              scope = scope.extending(extension) if extension
148  
-            else
149  
-              scope = body
150  
-            end
  145
+            scope = all.scoping { body.call(*args) }
  146
+            scope = scope.extending(extension) if extension
151 147
 
152 148
             scope || all
153 149
           end

0 notes on commit 9281adc

Please sign in to comment.
Something went wrong with that request. Please try again.