instance method
current_scope_restoring_block
Ruby on Rails 8.0.4
Since v6.1.7.10 Private — implementation detail, not part of the public APISignature
current_scope_restoring_block(&block)
No documentation comment.
Parameters
-
blockblock
Source
# File activerecord/lib/active_record/relation.rb, line 1355
def current_scope_restoring_block(&block)
current_scope = model.current_scope(true)
-> record do
model.current_scope = current_scope
yield record if block_given?
end
end
Defined in activerecord/lib/active_record/relation.rb line 1355
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Relation