Module: Togo::DataMapper::Model
- Defined in:
- lib/togo/model/model.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- BLACKLIST =
[:id, :position]
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/togo/model/model.rb', line 12 def self.included(base) base.extend ClassMethods base.send(:class_variable_set, :@@list_properties, []) base.send(:class_variable_set, :@@form_properties, []) base.send(:class_variable_set, :@@user_list_properties, []) base.send(:class_variable_set, :@@user_form_properties, []) base.send(:class_variable_set, :@@custom_form_templates, {}) base.send(:class_variable_set, :@@property_options, {}) base.send(:class_variable_set, :@@inflector, (Extlib::Inflection rescue ActiveSupport::Inflector)) if MODELS.include?(base) # support code reloading MODELS[MODELS.index(base)] = base # preserve order of which models were loaded else MODELS << base end end |