What is the best practice for adding functionality to a Rails controller, while keeping legacy code and route intact?
===

I have a web service that returns some XML data using a RESTful API.  I am going to implement a new database with completely different controller code, that will be in effect after some date.  But any WS call for the old data should still use the old DB.

Right now, part of the URL contains the date.  I am parsing this at the beginning of the controller and then going off to an old or new function.

    def web_service_action
        
      #shared code between old and new methods
      @some_instance_variables = ...
    
      # check the date and fork appropriately
      if use_new?
        web_service_action_new
      else
        web_service_action_old
      end

    end

I'm wondering if there is a clever way to do this with a before_filter or a conditional in the routes file somehow?