Sha256: 3d76773ffb0f40de11ab30c4b52e923ca621fc14990fdf0712128dd21c6a6682
Contents?: true
Size: 1.53 KB
Versions: 1
Compression:
Stored size: 1.53 KB
Contents
# frozen_string_literal: true require 'rails_compatibility' require 'rails_compatibility/construct_join_dependency' require 'rails_compatibility/active_record' class << RailsCompatibility if GTE_RAILS_6_1 def build_joins(reflect, relation) join_dependency = construct_join_dependency(reflect, relation) joins = join_dependency.join_constraints([], relation.alias_tracker, relation.references_values) return joins end elsif GTE_RAILS_6_0 def build_joins(reflect, relation) join_dependency = construct_join_dependency(reflect, relation) joins = join_dependency.join_constraints([], relation.alias_tracker) return joins end elsif GTE_RAILS_5_2 def build_joins(reflect, relation) join_dependency = construct_join_dependency(reflect, relation) joins = join_dependency.join_constraints([], Arel::Nodes::InnerJoin, relation.alias_tracker) return joins end elsif GTE_RAILS_5_0 def build_joins(reflect, relation) join_dependency = construct_join_dependency(reflect, relation) info = join_dependency.join_constraints([], Arel::Nodes::InnerJoin)[0] return info.joins end elsif GTE_RAILS_4_0 def build_joins(reflect, relation) join_dependency = construct_join_dependency(reflect, relation) info = join_dependency.join_constraints([])[0] return info.joins end else def build_joins(reflect, relation) join_dependency = construct_join_dependency(reflect, relation) return join_dependency.join_associations end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails_compatibility-0.0.5 | lib/rails_compatibility/build_joins.rb |