Skip to content

Commit

Permalink
fix: remove downcase on model name when updated polymorphic associati…
Browse files Browse the repository at this point in the history
…on (#670)
  • Loading branch information
nicolasalexandre9 authored May 16, 2024
1 parent e3c05d8 commit ad5fe26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/forest_liana/belongs_to_updater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def perform
if @data.nil?
new_value = nil
else
association_klass = SchemaUtils.polymorphic_models(@association).select { |a| a.name.downcase == @data[:type] }.first
association_klass = SchemaUtils.polymorphic_models(@association).select { |a| a.name == @data[:type] }.first
new_value = association_klass.find(@data[:id]) if @data && @data[:id]
end
else
Expand Down

0 comments on commit ad5fe26

Please sign in to comment.