Skip to content

Instantly share code, notes, and snippets.

Created September 30, 2008 16:33
Show Gist options
  • Save anonymous/13872 to your computer and use it in GitHub Desktop.
Save anonymous/13872 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