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 9c0391d commit 14b1a1eCopy full SHA for 14b1a1e
lib/jsonapi/resource.rb
@@ -916,7 +916,7 @@ def _polymorphic_types
916
@poly_hash ||= {}.tap do |hash|
917
ObjectSpace.each_object do |klass|
918
next unless Module === klass
919
- if ActiveRecord::Base > klass
+ if klass < ActiveRecord::Base
920
klass.reflect_on_all_associations(:has_many).select{|r| r.options[:as] }.each do |reflection|
921
(hash[reflection.options[:as]] ||= []) << klass.name.downcase
922
end
0 commit comments