Sha256: 55f4b2b748f89073aef0c55f3c2623a12e3e03287b37e839524963d559595979

Contents?: true

Size: 755 Bytes

Versions: 50

Compression:

Stored size: 755 Bytes

Contents

# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# !!! PLEASE KEEP THIS SCRIPT IDEMPOTENT !!!
#
::User.current = ::User.anonymous_admin

# Mail Notifications
notifications = [
    {:name              => :insights_notifications,
     :description       => N_('Insights reports and messages for registered hosts'),
     :mailer            => 'RedhatAccess::InsightsMailer',
     :method            => 'create',
     :subscription_type => 'alert'
    }
]

notifications.each do |notification|
  ::MailNotification.where(name: notification[:name]).first_or_create!(notification)
end

::User.current = nil

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
redhat_access-2.9.1 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.8.1 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.2.20 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.2.19 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.2.18 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.2.17 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.2.16 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.2.15 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.2.14 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.2.13 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.2.12 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.2.11 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.2.10 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.2.9 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.2.8 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.2.7 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.1.10 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.0.17 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.0.16 db/seeds.d/201-add-insights-email-notifications.rb
redhat_access-2.1.9 db/seeds.d/201-add-insights-email-notifications.rb