Module: ActiveRecord::ModelSpaces::ClassMethods
- Defined in:
- lib/active_record/model_spaces.rb
Instance Method Summary collapse
- #current_table_name ⇒ Object
- #hoover ⇒ Object
-
#in_model_space(model_space_name, opts = {}) ⇒ Object
register a model as belonging to a model space.
-
#new_version(&block) ⇒ Object
create a new version of the model.
- #set_table_name(table_name) ⇒ Object
- #table_name ⇒ Object
- #table_name=(table_name) ⇒ Object
-
#updated_version(&block) ⇒ Object
create an updated version of the model.
- #working_table_name ⇒ Object
Instance Method Details
#current_table_name ⇒ Object
65 66 67 |
# File 'lib/active_record/model_spaces.rb', line 65 def current_table_name REGISTRY.current_table_name(self) end |
#hoover ⇒ Object
83 84 85 |
# File 'lib/active_record/model_spaces.rb', line 83 def hoover REGISTRY.hoover(self) end |
#in_model_space(model_space_name, opts = {}) ⇒ Object
register a model as belonging to a model space
49 50 51 |
# File 'lib/active_record/model_spaces.rb', line 49 def in_model_space(model_space_name, opts={}) REGISTRY.register_model(self, model_space_name, opts) end |
#new_version(&block) ⇒ Object
create a new version of the model
74 75 76 |
# File 'lib/active_record/model_spaces.rb', line 74 def new_version(&block) REGISTRY.new_version(self, &block) end |
#set_table_name(table_name) ⇒ Object
53 54 55 |
# File 'lib/active_record/model_spaces.rb', line 53 def set_table_name(table_name) REGISTRY.set_base_table_name(self, table_name) end |
#table_name ⇒ Object
61 62 63 |
# File 'lib/active_record/model_spaces.rb', line 61 def table_name ActiveRecord::ModelSpaces::REGISTRY.table_name(self) end |
#table_name=(table_name) ⇒ Object
57 58 59 |
# File 'lib/active_record/model_spaces.rb', line 57 def table_name=(table_name) REGISTRY.set_base_table_name(self, table_name) end |
#updated_version(&block) ⇒ Object
create an updated version of the model
79 80 81 |
# File 'lib/active_record/model_spaces.rb', line 79 def updated_version(&block) REGISTRY.updated_version(self, &block) end |
#working_table_name ⇒ Object
69 70 71 |
# File 'lib/active_record/model_spaces.rb', line 69 def working_table_name REGISTRY.working_table_name(self) end |