- DRY : in a real application the code (the "business logic") in the create and update methods is quite the same - In previous projects I always used to have a single method handling the two based on the case it was a POST or a GET request - Which solution is the best ?
- respond_to do |format| : why does the generator produces both code for .html and .xml formats ? What am I supposed to do with the .xml part if I not working on a web service or such ? Remove it ?
Create a private method and put the common code that you can share for create and update.
If you don't need xml, you can remove it. The purpose of scaffold is to get you started with the CRUD way of doing things.