method
swap_connection_handler
v6.0.0 -
Show latest stable
- Class:
ActiveRecord::ConnectionHandling
swap_connection_handler(handler, &blk)private
No documentation available.
# File activerecord/lib/active_record/connection_handling.rb, line 260
def swap_connection_handler(handler, &blk) # :nodoc:
old_handler, ActiveRecord::Base.connection_handler = ActiveRecord::Base.connection_handler, handler
yield
ensure
ActiveRecord::Base.connection_handler = old_handler
end