Here is one way that worked for me.
It does not “delete” routes, but allows you to control where they match. You probably want each requested route to match something, even if it catches all 404 below.
Your application routes (MyApp / config / routes.rb) will be loaded first (unless you have changed the default boot process). And the routes matching the first will take precedence.
Thus, you can redefine the routes that you want to block, or block them by catching the entire route at the bottom of YourApp / config / routes.rb.
Named routes, unfortunately, seem to follow the ruby rule "last definition wins." Therefore, if the routes are named, and your application or engine uses these names, you need to determine the routes both first (so that yours coincide in the first place) and the last (the so-called route routes, as you expected, and not how the engine defines )
To redefine engine routes after adding them, create a file with the name
# config/named_routes_overrides.rb Rails.application.routes.draw do
You can test this routing sandwich in the console:
> Rails.application.routes.url_helpers.my_named_route_path =>
After correction, these calls should coincide.
(I posted this initially in the google gem google group here: https://groups.google.com/forum/?fromgroups#!topic/refinery-cms/N5F-Insm9co )
source share