Module: ActiveRecord::Translation
- Includes:
- ActiveModel::Translation
- Included in:
- Base
- Defined in:
- activerecord/lib/active_record/translation.rb
Instance Method Summary collapse
-
#i18n_scope ⇒ Object
Set the i18n scope to overwrite ActiveModel.
-
#lookup_ancestors ⇒ Object
Set the lookup ancestors for ActiveModel.
Methods included from ActiveModel::Translation
Methods included from ActiveModel::Naming
#model_name, param_key, plural, route_key, singular, singular_route_key, uncountable?
Instance Method Details
#i18n_scope ⇒ Object
Set the i18n scope to overwrite ActiveModel.
18 19 20 |
# File 'activerecord/lib/active_record/translation.rb', line 18 def i18n_scope #:nodoc: :activerecord end |
#lookup_ancestors ⇒ Object
Set the lookup ancestors for ActiveModel.
6 7 8 9 10 11 12 13 14 15 |
# File 'activerecord/lib/active_record/translation.rb', line 6 def lookup_ancestors #:nodoc: klass = self classes = [klass] return classes if klass == ActiveRecord::Base while klass != klass.base_class classes << klass = klass.superclass end classes end |