Forum: Ruby on Rails Hacking journey::routes and simple-navigation

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Adam Wong (Guest)
on 2013-01-09 22:21
(Received via mailing list)
I really love the simple-navigation gem but there are some problems. My
configuration file is structurally identical to my routes file. That
redundancy is bad enough  *but* if I navigate to a url that
simple-navigation can't catch, it fails completely.

So I'm attempting to auto-generate my navigation directly from my
so that there's a navigation item for every possible route and "going
the map" is impossible.

An example:
resources :widgets should create a nav_item corresponding to the url
"widgets." This nav_item should have some children nav_items
to the show and edit widgets urls.

I've had good progress but simple-navigation stores nav_items in what is
essentially a tree structure while routes are stored as a list. I want
maintain the structure of my routes.rb, so this poses a bit of a
problem. I
tried to find the children of a route by regex'ing the all the url's but
this won't guarantee that I maintain the structure of my routes.rb file.

So my question is this: How do I extend Journey::Routes so that the
"widgets/" route maintains a parent-child relationship with it's

My work so
A half-working attempt. Might be slow to load, I can't afford anything
This topic is locked and can not be replied to.