Module: Gunter::Models

Defined in:
lib/gunter/models.rb

Class Method Summary collapse

Class Method Details

.model(name) ⇒ Object

Get model class by name

Parameters:

  • name (Symbol)

    the model name



12
13
14
# File 'lib/gunter/models.rb', line 12

def model(name)
  Gunter::Model.const_get(name.to_s.split('_').map(&:capitalize).join)
end