From 2f7a67629ce9f493f72deeb14a0d9c5929e4f023 Mon Sep 17 00:00:00 2001 From: Rimian Perkins Date: Mon, 27 Feb 2017 11:49:01 +1100 Subject: [PATCH] custom header name space and remove delete old --- plugin.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugin.rb b/plugin.rb index f1f67a2..7cb7de4 100644 --- a/plugin.rb +++ b/plugin.rb @@ -12,7 +12,7 @@ load File.expand_path('../config/stripe.rb', __FILE__) after_initialize do header_script = '' - discourse_payments_customization = SiteCustomization.find_or_create_by({ + discourse_donations_customization = SiteCustomization.find_or_create_by({ name: 'Discourse Donations Header', header: header_script, mobile_header: header_script, @@ -20,9 +20,7 @@ after_initialize do user_id: -1 }) - # Delete the old header (1.5.0) - SiteCustomization.where(name: 'Discourse Payments Header').delete_all - SiteCustomization.where(name: discourse_payments_customization.name).where.not(id: discourse_payments_customization.id).delete_all + SiteCustomization.where(name: discourse_donations_customization.name).where.not(id: discourse_donations_customization.id).delete_all end Discourse::Application.routes.prepend do