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-4.2.11.3 lib/active_record/translation.rb
activerecord-4.2.11.2 lib/active_record/translation.rb
activerecord-5.1.7 lib/active_record/translation.rb
activerecord-5.1.7.rc1 lib/active_record/translation.rb
activerecord-5.1.6.2 lib/active_record/translation.rb
activerecord-5.0.7.2 lib/active_record/translation.rb
activerecord-4.2.11.1 lib/active_record/translation.rb
activerecord-5.1.6.1 lib/active_record/translation.rb
activerecord-5.0.7.1 lib/active_record/translation.rb
activerecord-4.2.11 lib/active_record/translation.rb
activerecord-5.1.6 lib/active_record/translation.rb
activerecord-5.0.7 lib/active_record/translation.rb
activerecord-5.1.5 lib/active_record/translation.rb
activerecord-5.1.5.rc1 lib/active_record/translation.rb
activerecord-4.2.10 lib/active_record/translation.rb
activerecord-4.2.10.rc1 lib/active_record/translation.rb
activerecord-5.1.4 lib/active_record/translation.rb
activerecord-5.0.6 lib/active_record/translation.rb
activerecord-5.1.4.rc1 lib/active_record/translation.rb
activerecord-5.0.6.rc1 lib/active_record/translation.rb