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
25 26 27 28 29 30 31 32 |
# File 'app/models/tramway/core/application_record.rb', line 25 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
35 36 37 |
# File 'app/models/tramway/core/application_record.rb', line 35 def human_state_name I18n.t "activerecord.state_machines.tramway/core/application_record.state.states.#{state}" end |