Module: Rows::Model
- Included in:
- RowsController
- Defined in:
- lib/rows/model.rb
Instance Method Summary collapse
Instance Method Details
#model_class ⇒ Object
2 3 4 5 |
# File 'lib/rows/model.rb', line 2 def model_class @_model_class ||= self.class.model_class || Kernel.const_get(params[:controller].classify) end |
#model_name ⇒ Object
8 9 10 |
# File 'lib/rows/model.rb', line 8 def model_name @_model_name ||= model_class.model_name.name end |
#model_symbol ⇒ Object
12 13 14 |
# File 'lib/rows/model.rb', line 12 def model_symbol @_model_symbol ||= model_class.model_name.singular end |
#model_symbol_plural ⇒ Object
25 26 27 |
# File 'lib/rows/model.rb', line 25 def model_symbol_plural @_model_symbol_plural ||= model_symbol.pluralize end |