From f35dd2a30d67c01b948600fbf6e7c4ec49c2d9b4 Mon Sep 17 00:00:00 2001 From: yanxd Date: Mon, 12 May 2014 15:06:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=B8=8D=E5=90=88=E9=AA=8C=E8=AF=81=EF=BC=8C?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E9=A1=B5=E9=9D=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/bids_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 3136c5838..b4309bf17 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -693,7 +693,10 @@ class BidsController < ApplicationController redirect_to respond_path(@bid) else @bid.safe_attributes = params[:bid] - render :action => 'new_bid' + @homework = @bid + @project = Project.find_by_id(params[:course_id]) + @project_id = @project.id + render file: 'projects/new_homework', layout: 'base_courses' end end From 297835e25be669612af746ccb9b66236abd88402 Mon Sep 17 00:00:00 2001 From: xianbo Date: Mon, 12 May 2014 17:40:37 +0800 Subject: [PATCH 2/2] fix --- app/views/welcome/contest.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index e32d375d0..19ef620f2 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -153,7 +153,7 @@ <%= link_to(contest.name, show_contest_contest_path(contest.id), :class => "d-g-blue d-p-project-name", :title => "#{contest.name}", :target => "_blank") %> <% if contest.id == 2 or contest.id == 3 or contest.id == 6 %> - (<%= link_to("含#{contest.projects.where('is_public=1').count}个app", show_attendingcontest_contest_path(contest), :target => "_blank") %>) + (<%= link_to("含#{contest.projects.where('is_public=1').count}个作品", show_attendingcontest_contest_path(contest), :target => "_blank") %>) <% else %> (<%= link_to("含#{contest.contesting_softapplications.count}个app", show_attendingcontest_contest_path(contest), :target => "_blank") %>) <% end %>