%br
-if flash[:message]
    %h1= flash[:message] 
    %br
%h2= @assignment.title 
%p= @assignment.description
%p= "Start: #{@assignment.start_date.to_s}"
%p= "Due:   #{@assignment.due_date.to_s}"

-if Date.today < @assignment.due_date
    =button_to 'Submit Project to Assignment', submission_new_path(@assignment), method: :get
-else
    =button_to 'Submission closed', submission_new_path(@assignment), method: :get, disabled: true    
%br
%br
-if @assignment.course.userRole(@user).teacher?
    =button_to 'Edit Assignment', assignment_edit_path(@assignment), method: :get
    =button_to 'Delete Assignment', assignment_delete_path(@assignment), method: :get






%br
-if flash[:message]
    %h1= flash[:message] 
    %br
%h2= @assignment.title 
%p= @assignment.description
%p= "Start: #{@assignment.start_date.to_s}"
%p= "Due:   #{@assignment.due_date.to_s}"

-if Date.today < @assignment.due_date
    =button_to 'Submit Project to Assignment', submission_new_path(@assignment), method: :get
-else
    =button_to 'Submission closed', submission_new_path(@assignment), method: :get, disabled: true    
%br
%br
-if @assignment.course.userRole(@user).teacher?
    =button_to 'Edit Assignment', assignment_edit_path(@assignment), method: :get
    =button_to 'Delete Assignment', assignment_delete_path(@assignment), method: :post






Fix route for deleting assignment
Fix route for deleting assignment
