Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Extended by:
- ConnectionManager::ConnectionBuilder, ConnectionManager::ConnectionHelpers, ConnectionManager::Replication, ConnectionManager::Shards
- Defined in:
- lib/connection_manager/using.rb,
lib/connection_manager/patches/cross_schema_patch.rb
Class Method Summary collapse
-
.arel_table ⇒ Object
We want to make sure we get the full table name with schema.
Methods included from ConnectionManager::ConnectionHelpers
add_managed_connections, current_database_name, current_database_name=, establish_managed_connection, managed_connection_classes, managed_connections, readonly=, readonly?, set_to_readonly, use_database, yml_key
Methods included from ConnectionManager::ConnectionBuilder
ar_env, build_connection_class, build_connection_classes, configuration_keys, database_keys_for_auto_build, database_yml_attributes
Methods included from ConnectionManager::Replication
fetch_replication_method, replicant_classes, replicated, replicated?, replication_methods
Methods included from ConnectionManager::Shards
Class Method Details
.arel_table ⇒ Object
We want to make sure we get the full table name with schema
5 6 7 8 9 10 11 |
# File 'lib/connection_manager/patches/cross_schema_patch.rb', line 5 def arel_table # :nodoc: begin @arel_table ||= Arel::Table.new(quoted_table_name.to_s.gsub('`',''), arel_engine) rescue ActiveRecord::ConnectionNotEstablished Arel::Table.new(table_name, arel_engine) end end |