mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-12 03:50:22 +00:00
Prefer a concern that set a variable instead of a global helper
Therefor, for the right controllers, simply implements: ``` include WhiteLabel before_action :hide_ofn_navigation, only: [:show, :edit] ``` This is mort robust, since we're working in a controller level, not parsing URLs...
This commit is contained in:
committed by
David Cook
parent
5279be4dc6
commit
4ad2a1a723
@@ -10,6 +10,7 @@ class SplitCheckoutController < ::BaseController
|
||||
include CheckoutCallbacks
|
||||
include OrderCompletion
|
||||
include CablecarResponses
|
||||
include WhiteLabel
|
||||
|
||||
helper 'terms_and_conditions'
|
||||
helper 'checkout'
|
||||
@@ -18,6 +19,7 @@ class SplitCheckoutController < ::BaseController
|
||||
helper OrderHelper
|
||||
|
||||
before_action :set_checkout_redirect
|
||||
before_action :hide_ofn_navigation, only: [:edit, :update]
|
||||
|
||||
def edit
|
||||
redirect_to_step_based_on_order unless params[:step]
|
||||
|
||||
Reference in New Issue
Block a user