Sha256: b93cb37f9846340c9746901e6238a73d672660dd47794d27a267028ae04518d4

Contents?: true

Size: 489 Bytes

Versions: 318

Compression:

Stored size: 489 Bytes

Contents

module ActiveRecord
  module Translation
    include ActiveModel::Translation

    # Set the lookup ancestors for ActiveModel.
    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

    # Set the i18n scope to overwrite ActiveModel.
    def i18n_scope #:nodoc:
      :activerecord
    end
  end
end

Version data entries

318 entries across 282 versions & 23 rubygems

Version Path
activerecord-5.0.0.beta3 lib/active_record/translation.rb
activerecord-5.0.0.beta2 lib/active_record/translation.rb
activejob-lock-0.0.2 rails/activerecord/lib/active_record/translation.rb
activerecord-5.0.0.beta1.1 lib/active_record/translation.rb
activerecord-4.2.5.1 lib/active_record/translation.rb
activerecord-4.1.14.1 lib/active_record/translation.rb
activerecord-3.2.22.1 lib/active_record/translation.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/activerecord-4.2.4/lib/active_record/translation.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/activerecord-4.1.13/lib/active_record/translation.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/activerecord-4.1.13/lib/active_record/translation.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/activerecord-4.2.4/lib/active_record/translation.rb
activerecord-5.0.0.beta1 lib/active_record/translation.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/activerecord-4.1.13/lib/active_record/translation.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/activerecord-4.2.4/lib/active_record/translation.rb
activerecord-4.1.14 lib/active_record/translation.rb
activerecord-4.2.5 lib/active_record/translation.rb
activerecord-4.2.5.rc2 lib/active_record/translation.rb
activerecord-4.1.14.rc2 lib/active_record/translation.rb
activerecord-4.2.5.rc1 lib/active_record/translation.rb
activerecord-4.1.14.rc1 lib/active_record/translation.rb