diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index 0e7216a79..1477ec717 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -1,10 +1,8 @@ module NotificationsHelper - def create_system_notification(title, message) users = User.where.not(confirmed_at: nil) users.each do |u| UserNotification.create_notification(u, title, message, :system_message) end end - end diff --git a/app/models/user_notification.rb b/app/models/user_notification.rb index 4e451ea66..d0192c596 100644 --- a/app/models/user_notification.rb +++ b/app/models/user_notification.rb @@ -20,9 +20,9 @@ class UserNotification < ActiveRecord::Base notification.message = message notification.type_of = type notification.save! - usernotification = UserNotification.new(user: user, notification: notification, checked: false) + usernotification = UserNotification + .new(user: user, notification: notification, checked: false) usernotification.save! end end - end