Module: Trax::Model::ClassMethods

Defined in:
lib/trax/model.rb

Instance Method Summary collapse

Instance Method Details

#defaults(options = {}) ⇒ Object



44
45
46
47
48
# File 'lib/trax/model.rb', line 44

def defaults(options = {})
  options.each_pair do |key, val|
    self.trax_defaults.__send__("#{key}=", val)
  end
end

#register_trax_models(*models) ⇒ Object



50
51
52
53
54
# File 'lib/trax/model.rb', line 50

def register_trax_models(*models)
  models.each do |model|
    register_trax_model(model)
  end
end

#trax_registry_keyObject



56
57
58
# File 'lib/trax/model.rb', line 56

def trax_registry_key
  name.underscore
end