mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
add rake task for creating initial notifications
This commit is contained in:
parent
a9272c3813
commit
c1f29b8da4
14
lib/tasks/one_off.rake
Normal file
14
lib/tasks/one_off.rake
Normal file
@ -0,0 +1,14 @@
|
||||
namespace :one_off do
|
||||
desc "Create a notification for all users telling them about the new notifications"
|
||||
task notifications_announcement: :environment do
|
||||
User.all.find_each do |user|
|
||||
user.notifications.create(
|
||||
message_html: '<div>A new feature is now available:</div><div class="blue-text text-darken-3">Notifications on Notebook.ai</div>',
|
||||
icon: 'favorite',
|
||||
icon_color: 'red',
|
||||
happened_at: DateTime.current,
|
||||
passthrough_link: 'TODO'
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in New Issue
Block a user