redirect_to :create

My requirement is to maintain historical data, so basically each update creates a new record rather than updating the current record. In order to do this, I fetch the the latest record in the "edit" action and when the form is submitted I am trying to redirect_to :action => "create" in the update action.

But for some reason instead it gets redirected to the index action instead. When I debug, I can see that the form gets submitted to the "udpate" action but after the redirect_to line, instead of going into the create action it tries to find some default_renderer..

def update      redirect_to :action => "create" end

Am I doing this right?

Thanks

I'd say no, you're not.

Keeping back versions of a model should be the responsibility of the model, not the controller.

You're still updating the record, the difference is what happens when you do. The typical way to do this would be to use something like a before_save callback on the model to save the old version.

You might want to look at something like version_fu http://github.com/jmckible/version_fu