Class: ActiveRecord::Reflection::AssociationReflection

Inherits:
Object
  • Object
show all
Defined in:
lib/ext_active_record/association_extensions.rb

Overview

This will add the ‘mirrors_owner_db_connection’ property to the Association Reflection object.

Instance Method Summary collapse

Instance Method Details

#mirror_db_connectionObject



10
11
12
13
# File 'lib/ext_active_record/association_extensions.rb', line 10

def mirror_db_connection
  return :default unless self.options.key?(:mirror_db_connection)
  self.options.key?(:mirror_db_connection)
end

#mirror_db_connection=(value) ⇒ Object



15
16
17
# File 'lib/ext_active_record/association_extensions.rb', line 15

def mirror_db_connection=(value)
  self.options[:mirror_db_connection] = value
end