123456789_123456789_123456789_123456789_123456789_

Module: ActiveRecord::Translation

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Extended In:
Defined in: activerecord/lib/active_record/translation.rb

Instance Method Summary

Instance Method Details

#i18n_scope

This method is for internal use only.

Set the i18n scope to override ::ActiveModel.

[ GitHub ]

  
# File 'activerecord/lib/active_record/translation.rb', line 18

def i18n_scope # :nodoc:
  :activerecord
end

#lookup_ancestors

This method is for internal use only.

Set the lookup ancestors for ::ActiveModel.

[ GitHub ]

  
# 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.base_class?
    classes << klass = klass.superclass
  end
  classes
end