method
current_scope_restoring_block
v8.0.0 -
Show latest stable
- Class:
ActiveRecord::Relation
current_scope_restoring_block(&block)private
No documentation available.
# File activerecord/lib/active_record/relation.rb, line 1345
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