From 7ccd662d608a911445bfd4e1a703b1ad7173e1de Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Fri, 24 Aug 2018 11:09:26 +0300 Subject: [PATCH] Do not halt in before_create --- app/models/notification.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/notification.rb b/app/models/notification.rb index fe50cadea..df2dc1a9c 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -2,7 +2,7 @@ class Notification < ActiveRecord::Base include Versions # version/notification_version.rb belongs_to :registrar, required: true - before_create -> { self.read = false } + before_create -> { self.read = false; true } scope :unread, -> { where(read: false) }