diff --git a/db/dev_seeds.rb b/db/dev_seeds.rb index 966307e10..7b7af9342 100644 --- a/db/dev_seeds.rb +++ b/db/dev_seeds.rb @@ -34,5 +34,6 @@ require_relative 'dev_seeds/legislation_processes' require_relative 'dev_seeds/newsletters' require_relative 'dev_seeds/notifications' require_relative 'dev_seeds/widgets' +require_relative 'dev_seeds/admin_notifications' log "All dev seeds created successfuly 👍" diff --git a/db/dev_seeds/admin_notifications.rb b/db/dev_seeds/admin_notifications.rb new file mode 100644 index 000000000..2e87c6db1 --- /dev/null +++ b/db/dev_seeds/admin_notifications.rb @@ -0,0 +1,36 @@ +section "Creating Admin Notifications & Templates" do + AdminNotification.create!( + title: 'New usage Terms & Conditions!', + segment_recipient: 'administrators', + body: 'We have improved our usage terms & conditions! please check them out to be up to date.', + link: 'http://localhost:3000/condiciones-de-uso' + ).deliver + + AdminNotification.create!( + title: 'Help us translate consul 🤓', + segment_recipient: 'administrators', + body: 'If you are proficient in a language, please help us translate consul!.', + link: 'https://crwd.in/consul' + ).deliver + + AdminNotification.create!( + title: 'You can now geolocate proposals & investments', + segment_recipient: 'administrators', + body: 'When you create a proposal or investment you now can specify a point on a map 🗺' + ).deliver + + AdminNotification.create!( + title: 'We just opened a new Participatory Budget!', + segment_recipient: 'administrators', + link: 'https://www.decide.madrid.es/presupuestos2018/1', + body: 'Start creating proposals for budget investments!' + ).deliver + + AdminNotification.create!( + title: 'We are closing the 2018 Participatory Budget!!', + segment_recipient: 'administrators', + link: 'https://www.decide.madrid.es/presupuestos2018/1', + body: 'Hurry up and create a last proposal before it ends next in two days!', + sent_at: nil + ) +end