Module: DataFabric::ActiveRecordConnectionMethods

Defined in:
lib/data_fabric/connection_proxy.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
# File 'lib/data_fabric/connection_proxy.rb', line 3

def self.included(base)
  base.alias_method_chain :reload, :master
end

Instance Method Details

#reload_with_master(*args, &block) ⇒ Object



7
8
9
# File 'lib/data_fabric/connection_proxy.rb', line 7

def reload_with_master(*args, &block)
  connection.with_master { reload_without_master }
end