app/controllers/assignments_controller.rb
#--------------------------------------------------------------------------------------------------------------------
# DELETE
# TODO: not been cleanup yep
#--------------------------------------------------------------------------------------------------------------------
DELETE
TODO: not been cleanup yep
DELETE TODO : not been cleanup yep
def delete
    begin
      @assignment_form = AssignmentForm.create_form_object(params[:id])
      @user = session[:user]
      id = @user.get_instructor
      if id != @assignment_form.assignment.instructor_id
        raise "You are not authorized to delete this assignment."
      else
        @assignment_form.delete(params[:force])
        flash[:success] = "The assignment was successfully deleted."
      end
    rescue => e
      flash[:error] = e.message
    end
    redirect_to list_tree_display_index_path
  end
def delete begin @assignment_form = AssignmentForm . create_form_object ( params [ :id ] ) @user = session [ :user ] id = @user . get_instructor if id != @assignment_form . assignment . instructor_id raise "You are not authorized to delete this assignment." else @assignment_form . delete ( params [ :force ] ) flash [ :success ] = "The assignment was successfully deleted." end rescue => e flash [ :error ] = e . message end redirect_to list_tree_display_index_path end
DELETE
TODO: not been cleanup yep
DELETE TODO : not been cleanup yep