summaryrefslogtreecommitdiff
path: root/lib/generators/solidus_subscriptions/install/install_generator.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/generators/solidus_subscriptions/install/install_generator.rb')
-rw-r--r--lib/generators/solidus_subscriptions/install/install_generator.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/generators/solidus_subscriptions/install/install_generator.rb b/lib/generators/solidus_subscriptions/install/install_generator.rb
index 42cc4f8..bd7a6a4 100644
--- a/lib/generators/solidus_subscriptions/install/install_generator.rb
+++ b/lib/generators/solidus_subscriptions/install/install_generator.rb
@@ -3,8 +3,14 @@
module SolidusSubscriptions
module Generators
class InstallGenerator < Rails::Generators::Base
+ source_root File.expand_path('templates', __dir__)
+
class_option :auto_run_migrations, type: :boolean, default: false
+ def copy_initializer
+ template 'initializer.rb', 'config/initializers/solidus_subscriptions.rb'
+ end
+
def add_javascripts
append_file 'vendor/assets/javascripts/spree/backend/all.js', "//= require spree/backend/solidus_subscriptions\n"
end