Skip to content

Commit c990929

Browse files
committed
Change how we look up constants
1 parent 16aa0d0 commit c990929

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/polymorphic_integer_type/extensions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def remove_type_and_establish_mapping(name, options, scope)
9595
def retrieve_polymorphic_type_mapping(polymorphic_type:, class_name:)
9696
return if polymorphic_type.nil?
9797

98-
belongs_to_class = class_name.safe_constantize
98+
belongs_to_class = compute_type(class_name)
9999
method_name = "#{polymorphic_type}_type_mapping"
100100

101101
if belongs_to_class && belongs_to_class.respond_to?(method_name)

0 commit comments

Comments
 (0)