Skip to content

Commit

Permalink
update changes to saved_changes for after_save callbacks due to Rails…
Browse files Browse the repository at this point in the history
… 5.1 activemodel::dirty changes (#376)
  • Loading branch information
yuenmichelle1 authored Oct 23, 2024
1 parent cdcdc39 commit 4c6b171
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/comment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def update_board_id
end

def update_moved_discussion
changes.fetch(:discussion_id, []).compact.each do |id|
saved_changes.fetch(:discussion_id, []).compact.each do |id|
Discussion.find_by_id(id).try :update_counters!
end
end
Expand Down

0 comments on commit 4c6b171

Please sign in to comment.