We currently have a poor-man's CMS (content management system) where we use method_missing() to redirect_to a stored page in a database. I would like to re-write the url back to the original request. How?
1. User goes to http://www.example.com/home/news 2. However, :controller => 'home', :action => 'index' doesn't exist so we get a method_missing which we trap in app/controller/application.rb.
3. We then ContentPage.find_by_controller_and_action(params[:controller], params[:action]) and 4. redirect_to :controller => 'content_pages', :action => 'show', :id => content_page.id
However, I would like to rewrite the url from:
to the original request
Any advice or ideas?