Method: Olivander::ApplicationHelper#resource_field_group_label

Defined in:
app/helpers/olivander/application_helper.rb

#resource_field_group_label(resource_class, key) ⇒ Object



115
116
117
118
# File 'app/helpers/olivander/application_helper.rb', line 115

def resource_field_group_label(resource_class, key)
  i18n_key = "activerecord.attributes.#{resource_class.name.underscore}.resource_field_groups.#{key}"
  I18n.exists?(i18n_key) ? O18n.t(i18n_key) : key.to_s.titleize
end