There was an error while loading. Please reload this page.
1 parent 9a786a7 commit 3bc979bCopy full SHA for 3bc979b
1 file changed
lib/rest_framework/controller.rb
@@ -687,8 +687,8 @@ def readable_columns_or_associations
687
next true if f.in?(columns)
688
689
# Skip polymorphic associations: they can't be JOINed, so filtering or ordering through them
690
- # (e.g. `?favorite.name=x` or `?ordering=favorite.name`) would raise. This method is the safe
691
- # field surface for those query features.
+ # (e.g. `?favorite.name=x` or `?ordering=favorite.name`) would raise. This method is the
+ # safe field surface for those query features.
692
field = cfg[f]
693
field&.[](:kind) == "association" && !field[:reflection]&.polymorphic?
694
end
0 commit comments