From 999b856d84e907bc188d7c6534ad54494cc21148 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 5 Jun 2014 15:14:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=93=E5=BC=80=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E5=88=97=E8=A1=A8=E7=95=8C=E9=9D=A2=E6=95=88=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/bids_controller.rb | 2 +- app/views/bids/_homework_list.html.erb | 16 +--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 97ebb4d4..c0df0699 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -878,7 +878,7 @@ class BidsController < ApplicationController def find_bid if params[:id] - @bid = Bid.find(params[:id]) + @bid = Bid.find(params[:id], :include => [{:homeworks => :user}]) @user = @bid.author end rescue diff --git a/app/views/bids/_homework_list.html.erb b/app/views/bids/_homework_list.html.erb index 5e041065..48f1c150 100644 --- a/app/views/bids/_homework_list.html.erb +++ b/app/views/bids/_homework_list.html.erb @@ -99,7 +99,7 @@   - <% if is_cur_course_user? @bid %> + <% if User.current.member_of?(@bid.courses.first) %> <%= l(:label_bidding_user_studentcode) %>  : <%= homework.user.user_extensions.student_id%> <% end %> @@ -112,20 +112,6 @@ <% end %> - -