-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Controller and Helper patches autoloadable
- Loading branch information
Showing
4 changed files
with
41 additions
and
22 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
app/decorators/controllers/alchemy/solidus/alchemy_base_controller_decorator.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# frozen_string_literal: true | ||
|
||
module Alchemy | ||
module Solidus | ||
module AlchemyBaseControllerDecorator | ||
def self.prepended(base) | ||
base.include Spree::Core::ControllerHelpers::Auth | ||
base.include Spree::Core::ControllerHelpers::Common | ||
base.include Spree::Core::ControllerHelpers::Order | ||
base.include Spree::Core::ControllerHelpers::PaymentParameters | ||
base.include Spree::Core::ControllerHelpers::Pricing | ||
base.include Spree::Core::ControllerHelpers::Search | ||
base.include Spree::Core::ControllerHelpers::Store | ||
base.include Spree::Core::ControllerHelpers::StrongParameters | ||
end | ||
|
||
if defined?(::Alchemy::BaseController) | ||
::Alchemy::BaseController.prepend self | ||
end | ||
end | ||
end | ||
end |
19 changes: 19 additions & 0 deletions
19
app/decorators/helpers/alchemy/solidus/alchemy_base_helper_decorator.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
module Alchemy | ||
module Solidus | ||
module AlchemyBaseHelperDecorator | ||
def self.prepended(base) | ||
base.include Spree::BaseHelper | ||
base.include Spree::CheckoutHelper | ||
base.include Spree::ProductsHelper | ||
base.include Spree::StoreHelper | ||
base.include Spree::TaxonsHelper | ||
end | ||
|
||
if defined?(::Alchemy::BaseHelper) | ||
::Alchemy::BaseHelper.prepend self | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.