Skip to content

Commit 08c64bb

Browse files
committed
super automatically passes on the implicit block
1 parent 05320e3 commit 08c64bb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

activerecord/lib/active_record/associations/association_collection.rb

+1-5
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,7 @@ def method_missing(method, *args)
408408
end
409409

410410
if @target.respond_to?(method) || (!@reflection.klass.respond_to?(method) && Class.respond_to?(method))
411-
if block_given?
412-
super { |*block_args| yield(*block_args) }
413-
else
414-
super
415-
end
411+
super
416412
elsif @reflection.klass.scopes[method]
417413
@_named_scopes_cache ||= {}
418414
@_named_scopes_cache[method] ||= {}

0 commit comments

Comments
 (0)