2
votes

I have an engine (Social Stream) mounted into my Rails app. When I run rake routes I get all the routes, including the mounted engine's routes. This is useful, but there are many routes.

Is there a way to run rake routes so it returns the routes for the parent application only and not the engine? I would still want to be able to run for the engine as well.

2

2 Answers

6
votes

I always found the output of rake routes too verbose. I usually just grep for what I'm interested in. Say I'm looking for a route that contains the word login, just run:

rake routes | grep login

Of course this goes the other way as well. Want every route except the ones containing login? Just run an inverse selection:

rake routes | grep -v login

So in your case just do an inverse selection of the engine's name.

2
votes

You can also make 'rake routes' show only routes of the specific controller, when calling (as an example for 'homepage' controller)

CONTROLLER=homepage rake routes