Module: ActsAsRailable::Humanable

Extended by:
ActiveSupport::Concern
Defined in:
lib/acts_as_railable/humanable.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#i18n_attribute_name(attr) ⇒ Object



37
38
39
# File 'lib/acts_as_railable/humanable.rb', line 37

def i18n_attribute_name attr
  self.class.human_attribute_name attr
end

#i18n_enum_name(enum_name) ⇒ Object



41
42
43
44
# File 'lib/acts_as_railable/humanable.rb', line 41

def i18n_enum_name enum_name
  enum_value = self.public_send enum_name
  self.class.i18n_enum_name enum_name, enum_value
end