From 64eb4d362c219272396cbd9f2a211df93fd70d3a Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Thu, 11 Sep 2014 00:33:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86contest=E4=B8=BB=E9=A1=B5=E4=B8=AD?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A=E7=9A=84=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E6=94=B9=E6=88=90=E8=93=9D=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: alan <547533434@qq.com> --- app/helpers/application_helper.rb | 18 +++++++++--------- app/helpers/contests_helper.rb | 4 ++-- app/views/welcome/contest.html.erb | 2 +- config/routes.rb | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4ab09db38..ef18793ab 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -679,15 +679,15 @@ module ApplicationHelper def textilizable(*args) options = args.last.is_a?(Hash) ? args.pop : {} case args.size - when 1 - obj = options[:object] - text = args.shift - when 2 - obj = args.shift - attr = args.shift - text = obj.send(attr).to_s - else - raise ArgumentError, 'invalid arguments to textilizable' + when 1 + obj = options[:object] + text = args.shift + when 2 + obj = args.shift + attr = args.shift + text = obj.send(attr).to_s + else + raise ArgumentError, 'invalid arguments to textilizable' end return '' if text.blank? project = options[:project] || @project || (obj && obj.respond_to?(:project) ? obj.project : nil) diff --git a/app/helpers/contests_helper.rb b/app/helpers/contests_helper.rb index 67d1c3b3f..0bc3e5e73 100644 --- a/app/helpers/contests_helper.rb +++ b/app/helpers/contests_helper.rb @@ -100,10 +100,10 @@ module ContestsHelper def count_contest_project contests = Contest.find(:id) @projects = [] - # Modified by alan + # Modified by longjun # for contest in contests contests.each do |contest| - # end alan + # end longjun @projects += contest.contesting_projects end @projects.count diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index 3554f85dd..39716d50d 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -191,7 +191,7 @@