Conceptually you have to break down what REST is vs what the user sees.
See, at the REST level, it’s still a create, even though it seems like
something else. It’s terribly rare that you need any additional actions
the controller. New and Edit are not part of REST; they are there just
show your users the forms to manipulate data. If you were using XML with
your REST service, you’d simply pass XML directly to the create action
If I went to /items/25/edit, I might see a form with all the fields on
and a button at the botom which goes to the update action. A ‘copy’
could also be present. Give each button its own name (the default is
‘commit’ if you use submit_tag) and then in the update action, do a
params check. if the name is ‘copy’ then do the save-as stuff, and if
name is ‘commit’ use the normal update stuff.
You could keep it really clean by using a before_filter to intercep the
copy, which would keep the update action nice and clean. (if
params[:copy] Item.create_new_from(params) / redirect_to items_url /
So aside from a private method for the before_filter, no new controllerm
That’s just how I would do it. I am sure there are other ways.