Create select based on routing, how?

Posted by huug on Stack Overflow See other posts from Stack Overflow or by huug
Published on 2010-06-02T09:04:11Z Indexed on 2010/06/02 9:13 UTC
Read the original article Hit count: 176

Filed under:
|
|

I am trying to implement navigation like in Tree Based Navigation but based on url's defined in routes.rb (named routes, resources, ...).

Is it possible to retreive a collection of all routes defined in routes.rb?

So I can use it in a select like this:

<%= f.collection_select :url, Route.all, :url, :name %>

Tnx!

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about routing