Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def update
- @department = Department.find(params[:id])
- respond_to do |format|
- if @department.update_attributes(params[:department])
- flash[:notice] = 'Department was successfully updated.'
- format.html { redirect_to(@department) }
- format.xml { head :ok }
- else
- format.html { render :action => "edit", :layout => "main" }
- format.xml { render :xml => @department.errors, :status => :unprocessable_entity }
- end
- end
- end
Add Comment
Please, Sign In to add comment