diff --git a/app/controllers/contestnotifications_controller.rb b/app/controllers/contestnotifications_controller.rb index 5e935ff4d..47d85fe2b 100644 --- a/app/controllers/contestnotifications_controller.rb +++ b/app/controllers/contestnotifications_controller.rb @@ -158,7 +158,7 @@ class ContestnotificationsController < ApplicationController # format.html { redirect_to contestnotifications_url } # format.json { head :no_content } # end - @contestnotifications.destroy + @contestnotification.destroy redirect_to contest_contestnotifications_path(@contest) end diff --git a/app/views/contestnotifications/show.html.erb b/app/views/contestnotifications/show.html.erb index dab3761bd..17de4a85c 100644 --- a/app/views/contestnotifications/show.html.erb +++ b/app/views/contestnotifications/show.html.erb @@ -5,8 +5,8 @@ edit_contest_contestnotification_path(@contestnotification), :class => 'icon icon-edit', :accesskey => accesskey(:edit), - :onclick => '$("#edit-contestnotifications").show(); return false;') if User.current.allowed_to?(:manage_contestnotifications, @contest) %> - <%= delete_link contest_contestnotification_path(@contestnotification) if User.current.allowed_to?(:manage_contestnotifications, @contest) %> + :onclick => '$("#edit-contestnotifications").show(); return false;') if User.current%> + <%= delete_link contest_contestnotification_path(@contestnotification) if User.current%>