Module: Mongoid::Symbolize
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/symbolize/mongoid.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#read_i18n_attribute(attr_name) ⇒ Object
Return an attribute's i18n.
Instance Method Details
#read_i18n_attribute(attr_name) ⇒ Object
Return an attribute's i18n
160 161 162 163 |
# File 'lib/symbolize/mongoid.rb', line 160 def read_i18n_attribute(attr_name) t = self.class.i18n_translation_for(attr_name, read_attribute(attr_name)) t.is_a?(Hash) ? nil : t end |