mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-28 01:36:33 +08:00
Code style fixes
This commit is contained in:
parent
036bda3afa
commit
f5cc2fe225
2 changed files with 2 additions and 4 deletions
|
@ -1,10 +1,8 @@
|
||||||
module NotificationsHelper
|
module NotificationsHelper
|
||||||
|
|
||||||
def create_system_notification(title, message)
|
def create_system_notification(title, message)
|
||||||
users = User.where.not(confirmed_at: nil)
|
users = User.where.not(confirmed_at: nil)
|
||||||
users.each do |u|
|
users.each do |u|
|
||||||
UserNotification.create_notification(u, title, message, :system_message)
|
UserNotification.create_notification(u, title, message, :system_message)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,9 +20,9 @@ class UserNotification < ActiveRecord::Base
|
||||||
notification.message = message
|
notification.message = message
|
||||||
notification.type_of = type
|
notification.type_of = type
|
||||||
notification.save!
|
notification.save!
|
||||||
usernotification = UserNotification.new(user: user, notification: notification, checked: false)
|
usernotification = UserNotification
|
||||||
|
.new(user: user, notification: notification, checked: false)
|
||||||
usernotification.save!
|
usernotification.save!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue