Module: I18nUtils::Model
Instance Method Summary collapse
Instance Method Details
#t_attribute(klass, attribute) ⇒ Object
8 9 10 |
# File 'lib/i18n_utils.rb', line 8 def t_attribute(klass, attribute) klass.human_attribute_name(attribute) end |
#t_model(class_or_instance) ⇒ Object
12 13 14 15 |
# File 'lib/i18n_utils.rb', line 12 def t_model(class_or_instance) klass = class_or_instance.respond_to?(:model_name) ? class_or_instance : class_or_instance.class klass.model_name.human end |