Module: RailsI18nExtended
- Extended by:
- ActiveSupport::Concern
- Included in:
- ActiveRecord::Base
- Defined in:
- lib/rails_i18n_extended/version.rb,
lib/rails_i18n_extended/object_extensions.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- VERSION =
"0.1.5"
Instance Method Summary collapse
- #t_attr(attr, params = {}) ⇒ Object
- #t_custom_attr(attr, params = {}) ⇒ Object
- #t_enum(attr, params = {}) ⇒ Object
Instance Method Details
#t_attr(attr, params = {}) ⇒ Object
92 93 94 |
# File 'lib/rails_i18n_extended/object_extensions.rb', line 92 def t_attr(attr, params={}) self.class.t_attr(attr, params) end |
#t_custom_attr(attr, params = {}) ⇒ Object
96 97 98 |
# File 'lib/rails_i18n_extended/object_extensions.rb', line 96 def t_custom_attr(attr, params={}) self.class.t_custom_attr(attr, params) end |
#t_enum(attr, params = {}) ⇒ Object
100 101 102 103 104 |
# File 'lib/rails_i18n_extended/object_extensions.rb', line 100 def t_enum(attr, params={}) return unless send(attr).present? self.class.t_enum(attr, send(attr)) end |