Class: SelectableAttr::Enum::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/selectable_attr_i18n.rb

Instance Method Summary collapse

Instance Method Details

#nameObject



29
30
31
32
33
# File 'lib/selectable_attr_i18n.rb', line 29

def name
  I18n.locale.nil? ? @name :
    @enum.i18n_scope.blank? ? @name :
    I18n.translate(key, :scope => @enum.i18n_scope, :default => @name)
end