lib/connection_manager/using.rb in connection_manager-0.3.9 vs lib/connection_manager/using.rb in connection_manager-0.3.10
- old
+ new
@@ -30,12 +30,10 @@
def build_dup_class(connection_class_name)
con_class = connection_class_name.constantize
db_name = con_class.database_name
dup_klass = dup
dup_klass.class_eval <<-STR
- self.database_name = '#{db_name}'
- self.table_name_prefix = '#{db_name}.'
- self.table_name = '#{db_name}.#{table_name.split('.').last}'
+ self.use_database('#{db_name}',{:table_name => '#{table_name}'})
class << self
def model_name
#{self.name}.model_name
end
def connection_class