...... # POST /twits # POST /twits.xml def create @twit = Twit.new(params[:twit]) respond_to do |format| if @twit.save flash[:notice] = 'Twit was successfully created.' #format.html { redirect_to(@twit) } #format.xml { render :xml => @twit, :status => :created, :location => @twit } format.html { redirect_to(twits_url) } format.xml { head :ok } else format.html { render :action => "new" } format.xml { render :xml => @twit.errors, :status => :unprocessable_entity } end end end ......