custom header name space and remove delete old

This commit is contained in:
Rimian Perkins 2017-02-27 11:49:01 +11:00
parent 8769306a86
commit 2f7a67629c
1 changed files with 2 additions and 4 deletions

View File

@ -12,7 +12,7 @@ load File.expand_path('../config/stripe.rb', __FILE__)
after_initialize do after_initialize do
header_script = '<script src="https://js.stripe.com/v3/"></script>' header_script = '<script src="https://js.stripe.com/v3/"></script>'
discourse_payments_customization = SiteCustomization.find_or_create_by({ discourse_donations_customization = SiteCustomization.find_or_create_by({
name: 'Discourse Donations Header', name: 'Discourse Donations Header',
header: header_script, header: header_script,
mobile_header: header_script, mobile_header: header_script,
@ -20,9 +20,7 @@ after_initialize do
user_id: -1 user_id: -1
}) })
# Delete the old header (1.5.0) SiteCustomization.where(name: discourse_donations_customization.name).where.not(id: discourse_donations_customization.id).delete_all
SiteCustomization.where(name: 'Discourse Payments Header').delete_all
SiteCustomization.where(name: discourse_payments_customization.name).where.not(id: discourse_payments_customization.id).delete_all
end end
Discourse::Application.routes.prepend do Discourse::Application.routes.prepend do