Skip to content

Commit c01f473

Browse files
committed
fix non-integer relation
1 parent 46cdaa4 commit c01f473

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/polymorphic_integer_type/activerecord_5_0_0/polymorphic_array_value_extension.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def type_to_ids_mapping
2929

3030
hash[key] << convert_to_id(value)
3131
else
32-
hash[klass.polymorphic_name] << convert_to_id(value)
32+
hash[klass(value)&.polymorphic_name] << convert_to_id(value)
3333
end
3434
end
3535
end

0 commit comments

Comments
 (0)