Skip to content

Instantly share code, notes, and snippets.

@CodeOfficer
Forked from anonymous/gist:13872
Created October 1, 2008 21:30
Show Gist options
  • Save CodeOfficer/14197 to your computer and use it in GitHub Desktop.
Save CodeOfficer/14197 to your computer and use it in GitHub Desktop.
def update
@instructor = Instructor.find(params[:id])
respond_to do |format|
if @instructor.update_attributes(params[:instructor][course])
flash[:notice] = 'Instructor was successfully updated.'
format.html { redirect_to(@instructor) }
format.xml { head :ok }
else
format.html { render :action => "edit" }
format.xml { render :xml => @instructor.errors, :status => :unprocessable_entity }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment