Sha256: 4d89513d3558ab5f70e740bbfb8515a997265841694052fafde00d78da09e4b5

Contents?: true

Size: 520 Bytes

Versions: 34

Compression:

Stored size: 520 Bytes

Contents

# frozen_string_literal: true

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

34 entries across 34 versions & 4 rubygems

Version Path
activerecord-5.2.8.1 lib/active_record/translation.rb
activerecord-5.2.8 lib/active_record/translation.rb
activerecord-5.2.7.1 lib/active_record/translation.rb
activerecord-5.2.7 lib/active_record/translation.rb
activerecord-5.2.6.3 lib/active_record/translation.rb
activerecord-5.2.6.2 lib/active_record/translation.rb
activerecord-5.2.6.1 lib/active_record/translation.rb
activerecord-5.2.6 lib/active_record/translation.rb
activerecord-5.2.4.6 lib/active_record/translation.rb
activerecord-5.2.5 lib/active_record/translation.rb
activerecord-5.2.4.5 lib/active_record/translation.rb
activerecord-5.2.4.4 lib/active_record/translation.rb
activerecord-5.2.4.3 lib/active_record/translation.rb
activerecord-5.2.4.2 lib/active_record/translation.rb
activerecord-5.2.4.1 lib/active_record/translation.rb
activerecord-5.2.4 lib/active_record/translation.rb
activerecord-5.2.4.rc1 lib/active_record/translation.rb
spiral_form-0.1.1 vendor/bundle/gems/activerecord-5.2.3/lib/active_record/translation.rb
spiral_form-0.1.0 vendor/bundle/gems/activerecord-5.2.3/lib/active_record/translation.rb
activerecord-5.2.3 lib/active_record/translation.rb