SyntaxFix
Write A Post
Hire A Developer
Questions
you can add a condition to the after_update like so:
after_update
class SomeModel < ActiveRecord::Base after_update :send_notification, if: :published_changed? ... end
there's no need to add a condition within the send_notification method itself.
send_notification