-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ResourceController: Allow overriding routes proxy
Within Solidus, we always want to use the `spree` routes proxy as that is where all routes are defined. However, many people use the Resource controller as a parent controller in their main app, and because of this they need to override all the URL generation methods in the Resource Controller. This allows one to specify the routes proxy in a custom controller as follows: ```rb module MyApp class WidgetsController < Spree::Admin::ResourceController private def routes_proxy main_app end end ``` Engine Developers can use this for engines, as well: ```rb module MyEngine class WidgetsController < Spree::Admin::ResourceController private def routes_proxy my_engine end end ```
- Loading branch information
Showing
4 changed files
with
38 additions
and
13 deletions.
There are no files selected for viewing
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 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
File renamed without changes.
File renamed without changes.