Module: ActiveRecord::ModelSpaces

Defined in:
lib/active_record/model_spaces.rb,
lib/active_record/model_spaces/util.rb,
lib/active_record/model_spaces/context.rb,
lib/active_record/model_spaces/registry.rb,
lib/active_record/model_spaces/persistor.rb,
lib/active_record/model_spaces/model_space.rb,
lib/active_record/model_spaces/table_names.rb,
lib/active_record/model_spaces/table_manager.rb

Defined Under Namespace

Modules: ClassMethods, DefaultTableSchemaCopier, MySQLTableSchemaCopier, TableNames, Util Classes: Context, ModelSpace, Persistor, Registry, TableManager

Constant Summary collapse

REGISTRY =
Registry.new

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.connectionObject

Returns the value of attribute connection.



12
13
14
# File 'lib/active_record/model_spaces/model_space.rb', line 12

def connection
  @connection
end

.table_nameObject

Returns the value of attribute table_name.



13
14
15
# File 'lib/active_record/model_spaces/model_space.rb', line 13

def table_name
  @table_name
end

Class Method Details

.active_key(model_space_name) ⇒ Object



30
31
32
# File 'lib/active_record/model_spaces.rb', line 30

def active_key(model_space_name)
  REGISTRY.active_key(model_space_name)
end

.enforce_contextObject



38
39
40
# File 'lib/active_record/model_spaces.rb', line 38

def enforce_context
  REGISTRY.enforce_context
end

.included(mod) ⇒ Object



18
19
20
21
22
# File 'lib/active_record/model_spaces.rb', line 18

def self.included(mod)
  class << mod
    include ClassMethods
  end
end

.kill_context(model_space_name, model_space_key) ⇒ Object



34
35
36
# File 'lib/active_record/model_spaces.rb', line 34

def kill_context(model_space_name, model_space_key)
  REGISTRY.kill_context(model_space_name, model_space_key)
end

.set_enforce_context(ec) ⇒ Object



42
43
44
# File 'lib/active_record/model_spaces.rb', line 42

def set_enforce_context(ec)
  REGISTRY.set_enforce_context(ec)
end

.with_context(model_space_name, model_space_key, &block) ⇒ Object



26
27
28
# File 'lib/active_record/model_spaces.rb', line 26

def with_context(model_space_name, model_space_key, &block)
  REGISTRY.with_context(model_space_name, model_space_key, &block)
end