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
6
7
# File 'lib/data_fabric/connection_proxy.rb', line 3

def self.included(base)
  unless base.method_defined? :reload_without_master
    base.alias_method_chain :reload, :master
  end
end

Instance Method Details

#reload_with_master(*args, &block) ⇒ Object



9
10
11
# File 'lib/data_fabric/connection_proxy.rb', line 9

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