move into engine.rb

This commit is contained in:
Rimian Perkins 2017-02-06 12:11:48 +11:00
parent 719bd2138c
commit a1d1c122ed
2 changed files with 9 additions and 7 deletions

7
lib/choice/engine.rb Normal file
View File

@ -0,0 +1,7 @@
module ::Choice
class Engine < ::Rails::Engine
engine_name 'choice'
isolate_namespace Choice
end
end

View File

@ -1,6 +1,6 @@
# name: choice-plugin # name: choice-plugin
# about: Integrating Discourse with Stripe # about: Integrating Discourse with Stripe
# version: 0.0.3 # version: 0.1.0
# authors: Rimian Perkins # authors: Rimian Perkins
gem 'stripe', '1.58.0' gem 'stripe', '1.58.0'
@ -12,12 +12,7 @@ Rails.configuration.stripe = {
Stripe.api_key = Rails.configuration.stripe[:secret_key] Stripe.api_key = Rails.configuration.stripe[:secret_key]
module ::Choice require File.expand_path('../lib/choice/engine', __FILE__)
class Engine < ::Rails::Engine
engine_name 'choice'
isolate_namespace Choice
end
end
after_initialize do after_initialize do
Discourse::Application.routes.prepend do Discourse::Application.routes.prepend do