From 9f29a6c82ab4f385732e98e480e1c733704a75f7 Mon Sep 17 00:00:00 2001 From: wanglinchun Date: Thu, 29 May 2014 20:15:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86base=E7=9A=84=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=BC=95=E5=85=A5=E7=AB=9E=E8=B5=9B=E9=80=9A=E7=9F=A5=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E4=BD=BF=E5=85=B6=E5=B1=80=E9=83=A8=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=EF=BC=8C=E6=8E=A5=E4=B8=8B=E6=9D=A5=E5=B0=86=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD=E9=80=90=E6=AD=A5=E5=BC=95=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/contests_controller.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/controllers/contests_controller.rb b/app/controllers/contests_controller.rb index d6b862361..b51a11436 100644 --- a/app/controllers/contests_controller.rb +++ b/app/controllers/contests_controller.rb @@ -5,7 +5,8 @@ class ContestsController < ApplicationController menu_item :project, :only => :show_project menu_item :application, :only => :show_softapplication menu_item :attendingcontest, :only => :show_attendingcontest - before_filter :find_contest, :only => [:show_contest, :show_project, :show_softapplication, :show_attendingcontest, :set_reward_project, :set_reward_softapplication, :create,:destroy,:more,:back,:add,:add_softapplication,:new,:show_results, :set_reward, + menu_item :contestnotification, :only => :show_notification + before_filter :find_contest, :only => [:show_contest, :show_project, :show_softapplication, :show_attendingcontest, :show_notification, :set_reward_project, :set_reward_softapplication, :create,:destroy,:more,:back,:add,:add_softapplication,:new,:show_results, :set_reward, :show_contest_project, :show_contest_user, :join_in_contest, :unjoin_in_contest, :new_join,:show_participator, :settings] # added by fq @@ -357,7 +358,13 @@ class ContestsController < ApplicationController ###end def show_notification - + @contest = Contest.find_by_id(params[:id]) + respond_to do |format| + format.html { + render :layout => 'base_newcontest' + } + format.api + end end