Sha256: e6d5f53286e8bf066fc999a39da7bb03c3d44479799d661b44f45bf8c672bc98

Contents?: true

Size: 291 Bytes

Versions: 7

Compression:

Stored size: 291 Bytes

Contents

module Polyamorous
  module ReflectionExtensions
    def build_join_constraint(table, foreign_table)
      if polymorphic?
        super(table, foreign_table)
        .and(foreign_table[foreign_type].eq(klass.name))
      else
        super(table, foreign_table)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
polyamorous-2.3.2 lib/polyamorous/activerecord_5.2_ruby_2/reflection.rb
polyamorous-2.3.1 lib/polyamorous/activerecord_5.2_ruby_2/reflection.rb
ransack-2.3.2 polyamorous/lib/polyamorous/activerecord_5.2_ruby_2/reflection.rb
ransack-2.3.1 polyamorous/lib/polyamorous/activerecord_5.2_ruby_2/reflection.rb
polyamorous-2.3.0 lib/polyamorous/activerecord_5.2.0_ruby_2/reflection.rb
ransack-2.3.0 polyamorous/lib/polyamorous/activerecord_5.2.0_ruby_2/reflection.rb
temp_poly-2.1.1a lib/polyamorous/activerecord_5.2.0_ruby_2/reflection.rb