Sha256: 7572de2c3932705dec104c1a4114b1655d6bd42305718f0672d280e045caaa2b

Contents?: true

Size: 514 Bytes

Versions: 47

Compression:

Stored size: 514 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.base_class?
        classes << klass = klass.superclass
      end
      classes
    end

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

Version data entries

47 entries across 46 versions & 8 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.8.7/lib/active_record/translation.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.3.4/lib/active_record/translation.rb
activerecord-7.1.5.1 lib/active_record/translation.rb
activerecord-7.0.8.7 lib/active_record/translation.rb
activerecord-7.1.5 lib/active_record/translation.rb
activerecord-7.1.4.2 lib/active_record/translation.rb
activerecord-7.0.8.6 lib/active_record/translation.rb
activerecord-7.1.4.1 lib/active_record/translation.rb
activerecord-7.0.8.5 lib/active_record/translation.rb
activerecord-7.1.4 lib/active_record/translation.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8.4/lib/active_record/translation.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.3.4/lib/active_record/translation.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.5.1/lib/active_record/translation.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.5.1/lib/active_record/translation.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.5.1/lib/active_record/translation.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.4/lib/active_record/translation.rb
activerecord-7.1.3.4 lib/active_record/translation.rb
activerecord-7.0.8.4 lib/active_record/translation.rb
activerecord-7.1.3.2 lib/active_record/translation.rb
activerecord-7.1.3.1 lib/active_record/translation.rb