Reload or Add routes at runtime in Rails 3

In one of my project, we needed SEO friendly Menu urls like /brandy/cognac. For this, we added a generic route/:parent/:child/:grandchild at the bottom of routes.rb. With this approach, there was an issue with invalid urls like /this/is/wrong being redirected to specified controller action. To fix this, we used Menu names to generate specific urls. But the routes would become invalid if Admin…