From 467f8f54e16bfebf48e6cbff694c3ed9b02a1706 Mon Sep 17 00:00:00 2001 From: wanglinchun Date: Sat, 7 Jun 2014 11:15:58 +0800 Subject: [PATCH] sdf --- app/controllers/contestnotifications_controller.rb | 2 +- app/views/contestnotifications/show.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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%>

<%=h @contestnotification.title %>