Class: RademadeAdmin::Model::Configuration::FieldsLabels

Inherits:
Fields
  • Object
show all
Defined in:
lib/rademade_admin/model/configuration/fields_labels.rb

Instance Method Summary collapse

Methods inherited from Fields

#all, #configure, #find, #find_with_index, #method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RademadeAdmin::Model::Configuration::Fields

Instance Method Details

#label_for(name) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/rademade_admin/model/configuration/fields_labels.rb', line 9

def label_for(name)
  field = find(name)
  if field.nil?
    name.to_s.humanize
  else
    field.label
  end
end