From 13be4bfdfb2bc1692e24cffbf46ba26d7df8b157 Mon Sep 17 00:00:00 2001 From: Russell Schmidt Date: Mon, 10 Apr 2017 14:55:21 -0700 Subject: [PATCH 1/3] add Koudoku::ApplicationHelpers to ApplicationHelper on install --- lib/generators/koudoku/install_generator.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/generators/koudoku/install_generator.rb b/lib/generators/koudoku/install_generator.rb index 060d3b7..1dc12b6 100644 --- a/lib/generators/koudoku/install_generator.rb +++ b/lib/generators/koudoku/install_generator.rb @@ -53,6 +53,9 @@ def install # Install the pricing table. copy_file "app/views/koudoku/subscriptions/_social_proof.html.erb" + # Enable Koudoku helpers + inject_into_class "app/helpers/application_helper.rb", "include Koudoku::ApplicationHelper" + # Add webhooks to the route. route <<-RUBY From 24a9fb944c464009ffa2759d2cbd6adcfba69ff5 Mon Sep 17 00:00:00 2001 From: Russell Schmidt Date: Mon, 10 Apr 2017 16:14:11 -0700 Subject: [PATCH 2/3] add class/klass argument to inject_into_class --- lib/generators/koudoku/install_generator.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/generators/koudoku/install_generator.rb b/lib/generators/koudoku/install_generator.rb index 1dc12b6..26a15f8 100644 --- a/lib/generators/koudoku/install_generator.rb +++ b/lib/generators/koudoku/install_generator.rb @@ -54,7 +54,8 @@ def install copy_file "app/views/koudoku/subscriptions/_social_proof.html.erb" # Enable Koudoku helpers - inject_into_class "app/helpers/application_helper.rb", "include Koudoku::ApplicationHelper" + inject_into_class "app/helpers/application_helper.rb", ApplicationHelper, + "include Koudoku::ApplicationHelper\n\n" # Add webhooks to the route. From ca314b8d4a556f34bf23b2640c924afb1e3c65d3 Mon Sep 17 00:00:00 2001 From: Russell Schmidt Date: Mon, 10 Apr 2017 16:19:22 -0700 Subject: [PATCH 3/3] add in comment --- lib/generators/koudoku/install_generator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generators/koudoku/install_generator.rb b/lib/generators/koudoku/install_generator.rb index 26a15f8..753b1c6 100644 --- a/lib/generators/koudoku/install_generator.rb +++ b/lib/generators/koudoku/install_generator.rb @@ -55,7 +55,7 @@ def install # Enable Koudoku helpers inject_into_class "app/helpers/application_helper.rb", ApplicationHelper, - "include Koudoku::ApplicationHelper\n\n" + "# Added by Koudoku.\n include Koudoku::ApplicationHelper\n\n" # Add webhooks to the route.