Skip to content

Commit

Permalink
Merge pull request #279 from seand7565/rename_decorators
Browse files Browse the repository at this point in the history
Move decorators to the correct folders and add EngineExtensions
  • Loading branch information
kennyadsl committed Nov 6, 2020
2 parents 720f2d1 + 846591f commit 356c8b2
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/solidus_paypal_braintree/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

module SolidusPaypalBraintree
class Engine < Rails::Engine
include SolidusSupport::EngineExtensions

isolate_namespace SolidusPaypalBraintree
engine_name 'solidus_paypal_braintree'

Expand All @@ -21,14 +23,6 @@ class Engine < Rails::Engine
Spree::PermittedAttributes.source_attributes.concat [:nonce, :payment_type]
end

def self.activate
Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*_decorator*.rb')).sort.each do |c|
Rails.configuration.cache_classes ? require(c) : load(c)
end
end

config.to_prepare(&method(:activate).to_proc)

if SolidusSupport.frontend_available?
config.assets.precompile += [
'solidus_paypal_braintree/checkout.js',
Expand Down

0 comments on commit 356c8b2

Please sign in to comment.