Class: Gold::Concerns::MerchantFacing::HasAccessToRoutes
- Inherits:
-
Object
- Object
- Gold::Concerns::MerchantFacing::HasAccessToRoutes
- Defined in:
- app/controllers/gold/concerns/merchant_facing.rb
Overview
Provides access to routes, passing in a particular controller as context. We go through the effort of putting this into a separate class because we do not want to directly include the url helpers into whatever controller we are included into because that might override routes. This solution isolates the Gold routes from whatever routes the app that Gold is embedded in may have defined.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(context) ⇒ HasAccessToRoutes
constructor
A new instance of HasAccessToRoutes.
Constructor Details
#initialize(context) ⇒ HasAccessToRoutes
Returns a new instance of HasAccessToRoutes.
34 35 36 37 |
# File 'app/controllers/gold/concerns/merchant_facing.rb', line 34 def initialize(context) @context = context @engine = context.gold_engine end |