Hey guys. In Rails 2, is there a way to create a route at run-time? I want to do this because a gem that I'm writing requires a single resource route, and I'd prefer that the gem create it at run-time instead of forcing the user to define the route in routes.rb .
While trying to figure this out, I discovered that calling ActionController::Routing::Routes.draw do |map| # my gem's route here end causes all of the routes in routes.rb to be removed. I tried copying the routes from ActionController::Routing::Routes into a new array or hash, then rebuilding them and adding my gem's route, but couldn't get that to work. Also, it's messy and less than ideal. So, any suggestions? I'm all ears! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.