From ceef85719e6b442f1d3c0647fd78b3ef463ede0d Mon Sep 17 00:00:00 2001 From: yanxd Date: Fri, 13 Jun 2014 11:49:11 +0800 Subject: [PATCH] contest fix --- app/controllers/contestnotifications_controller.rb | 1 + app/views/contestnotifications/index.html.erb | 6 +++--- app/views/contestnotifications/show.html.erb | 6 ++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/controllers/contestnotifications_controller.rb b/app/controllers/contestnotifications_controller.rb index 0d05d6ca..6b05e8e4 100644 --- a/app/controllers/contestnotifications_controller.rb +++ b/app/controllers/contestnotifications_controller.rb @@ -161,6 +161,7 @@ class ContestnotificationsController < ApplicationController # format.html { redirect_to contestnotifications_url } # format.json { head :no_content } # end + @contestnotification = Contestnotification.find(params[:id]) @contestnotification.destroy redirect_to contest_contestnotifications_path(@contest) end diff --git a/app/views/contestnotifications/index.html.erb b/app/views/contestnotifications/index.html.erb index e05abbdc..fc71bc64 100644 --- a/app/views/contestnotifications/index.html.erb +++ b/app/views/contestnotifications/index.html.erb @@ -11,13 +11,13 @@ -<% if @contest && User.current.allowed_to?(:manage_contestnotifications, @contest) %> +<% if @contest %>