Question

I would like to know if there is a good plugin for rendering navigation links in Rails. It would be nice if it could render links to all possible GET actions on a controller directly from the routes file.

Was it helpful?

Solution

Can I ask the purpose of your question? There are only four get actions in a RESTful controller, (index, show, edit, and new). The overhead in producing a list using a special route generator on the fly is probably too much.

You could simply create a partial that can render those four actions for whatever controller you're currently viewing (think params[:controller]).

As far as for all possible Get actions: All possible get actions would encompass the show action for each item in your database. That is, again, best handled in a partial and the use of link_to.

It's hard to give a complete answer though, because your circumstances seem unique.

I hope this helps even a little.

-Chris

OTHER TIPS

While this does not answer ths specific question, you can see all of your OWN routes on the command line by running

rake routes

This will give you your own personal readout of all of your routes on the site, however like Chris said above, this isn't really a specific answer, more of an FYI.

Cheers!

You should try Mmmenu: http://github.com/snitko/mmmenu It's very flexible.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top