Skip to content

Commit 14b1a1e

Browse files
committed
Clarify model check
1 parent 9c0391d commit 14b1a1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/jsonapi/resource.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ def _polymorphic_types
916916
@poly_hash ||= {}.tap do |hash|
917917
ObjectSpace.each_object do |klass|
918918
next unless Module === klass
919-
if ActiveRecord::Base > klass
919+
if klass < ActiveRecord::Base
920920
klass.reflect_on_all_associations(:has_many).select{|r| r.options[:as] }.each do |reflection|
921921
(hash[reflection.options[:as]] ||= []) << klass.name.downcase
922922
end

0 commit comments

Comments
 (0)