Class: Tramway::Core::ApplicationRecord
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Tramway::Core::ApplicationRecord
- Extended by:
- Enumerize
- Defined in:
- app/models/tramway/core/application_record.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#human_state_name ⇒ Object
FIXME detect inhertited locales.
Class Method Details
.human_attribute_name(attribute_name, *args) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'app/models/tramway/core/application_record.rb', line 23 def human_attribute_name(attribute_name, *args) excepted_attributes = %w( created_at updated_at state ) if attribute_name.to_s.in? excepted_attributes I18n.t "activerecord.attributes.tramway/core/application_record.#{attribute_name}" else super attribute_name end end |
Instance Method Details
#human_state_name ⇒ Object
FIXME detect inhertited locales
33 34 35 |
# File 'app/models/tramway/core/application_record.rb', line 33 def human_state_name I18n.t "activerecord.state_machines.tramway/core/application_record.state.states.#{state}" end |