Sha256: 69baeee31f0d3227faeec57e87bbc0b02a3e15b973bc787129dd103b07c87c32

Contents?: true

Size: 347 Bytes

Versions: 2

Compression:

Stored size: 347 Bytes

Contents

# encoding: utf-8
# frozen_string_literal: true

module Traits
  class Attribute
    module Querying
      def arel
        table = if features.try(:translates_with_globalize?)
          model_class.features.globalize.translation_model_class.arel_table
        else
          model.arel
        end
        table[name]
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activerecord-traits-1.0.3 lib/traits/attribute/querying.rb
activerecord-traits-1.0.2 lib/traits/attribute/querying.rb