Module: Superstore::Model
- Included in:
- Base
- Defined in:
- lib/superstore/model.rb
Instance Method Summary collapse
- #base_class ⇒ Object
- #column_family ⇒ Object
- #column_family=(table_name) ⇒ Object
- #config ⇒ Object
- #config=(config) ⇒ Object
- #table_name ⇒ Object
- #table_name=(table_name) ⇒ Object
Instance Method Details
#base_class ⇒ Object
21 22 23 |
# File 'lib/superstore/model.rb', line 21 def base_class class_of_active_record_descendant(self) end |
#column_family ⇒ Object
11 12 13 14 |
# File 'lib/superstore/model.rb', line 11 def column_family ActiveSupport::Deprecation.warn '`column_family` is deprecated & will be removed in superstore 2.0. Use `table_name` instead.' table_name end |
#column_family=(table_name) ⇒ Object
16 17 18 19 |
# File 'lib/superstore/model.rb', line 16 def column_family=(table_name) ActiveSupport::Deprecation.warn '`column_family=` is deprecated & will be removed in superstore 2.0. Use `table_name=` instead.' self.table_name = table_name end |
#config ⇒ Object
29 30 31 |
# File 'lib/superstore/model.rb', line 29 def config @@config end |
#config=(config) ⇒ Object
25 26 27 |
# File 'lib/superstore/model.rb', line 25 def config=(config) @@config = config.deep_symbolize_keys end |
#table_name ⇒ Object
7 8 9 |
# File 'lib/superstore/model.rb', line 7 def table_name @table_name ||= base_class.name.pluralize end |
#table_name=(table_name) ⇒ Object
3 4 5 |
# File 'lib/superstore/model.rb', line 3 def table_name=(table_name) @table_name = table_name end |