We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be26b9c commit 6405eefCopy full SHA for 6405eef
lib/forest_liana/active_record_override.rb
@@ -33,7 +33,7 @@ def apply_column_aliases(relation)
33
keys = [join_part.base_klass.primary_key] # Always include the primary key
34
35
# # %%% Optional to include all foreign keys:
36
- # keys.concat(join_part.base_klass.reflect_on_all_associations.select { |a| a.belongs_to? }.map(&:foreign_key))
+ keys.concat(join_part.base_klass.reflect_on_all_associations.select { |a| a.belongs_to? }.map(&:foreign_key))
37
# Add foreign keys out to referenced tables that we belongs_to
38
join_part.children.each { |child| keys << child.reflection.foreign_key if child.reflection.belongs_to? }
39
0 commit comments