lib/devise/models/authenticatable.rb in devise-4.7.1 vs lib/devise/models/authenticatable.rb in devise-4.7.2
- old
+ new
@@ -150,10 +150,11 @@
#
# def send_devise_notification(notification, *args)
# # If the record is new or changed then delay the
# # delivery until the after_commit callback otherwise
# # send now because after_commit will not be called.
- # if new_record? || changed?
+ # # For Rails < 6 use `changed?` instead of `saved_changes?`.
+ # if new_record? || saved_changes?
# pending_devise_notifications << [notification, args]
# else
# render_and_send_devise_message(notification, *args)
# end
# end