Skip to content

Commit 83627ac

Browse files
committed
fix: use table_name instead of relation name
1 parent e92afc6 commit 83627ac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/jsonapi/active_relation/join_manager.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def self.get_join_arel_node(records, relationship, join_type, options = {})
9494
table_name = relationship.resource_klass._table_name
9595

9696
last_join = join_sources.find { |j|
97-
valid_join_types.any? { |t| j.is_a?(t) } && j.left.name == table_name
97+
valid_join_types.any? { |t| j.is_a?(t) } && j.left.table_name == table_name
9898
}
9999
end
100100

0 commit comments

Comments
 (0)