Skip to content

Commit 2a867db

Browse files
perf: use after_create_commit for comment relaying
1 parent 9bd3cbd commit 2a867db

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/models/comment.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
class Comment < ApplicationRecord
44
validates :author, :text, presence: true
5-
after_commit { CommentRelayJob.perform_later(self) }
5+
after_create_commit { CommentRelayJob.perform_later(self) }
66
end

0 commit comments

Comments
 (0)