custom header name space and remove delete old
This commit is contained in:
parent
8769306a86
commit
2f7a67629c
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue