Access named routes outside controller or view


Could anyone advise if it’s possible to access named routes in regular
class within a rails application.

I am working on a system to define menu structure with a rails app.
Rather than using something like :controller => user, :action => index
for each menu item, it would make things simpler if I could tap into the
named routes methods such as ‘users_url’ as generated by map.resources

I haven’t quite got enough knowledge of rails framework to work this one
out yet.

Thanks, Andrew.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs