Skip to content

Commit dd43997

Browse files
fix: remove downcase on model name when updated polymorphic association on 8.x.x (#676)
1 parent 5058edd commit dd43997

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/services/forest_liana/belongs_to_updater.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def perform
1717
if @data.nil?
1818
new_value = nil
1919
else
20-
association_klass = SchemaUtils.polymorphic_models(@association).select { |a| a.name.downcase == @data[:type] }.first
20+
association_klass = SchemaUtils.polymorphic_models(@association).select { |a| a.name == @data[:type] }.first
2121
new_value = association_klass.find(@data[:id]) if @data && @data[:id]
2222
end
2323
else

0 commit comments

Comments
 (0)