add course filter

This commit is contained in:
xianbo 2013-10-10 15:05:27 +08:00
parent 64cddc8687
commit 543279eb84
1 changed files with 7 additions and 3 deletions

View File

@ -211,11 +211,15 @@ class BidsController < ApplicationController
@membership = User.current.memberships.all(:conditions => Project.visible_condition(User.current))
@option = []
@membership.each do |membership|
if(membership.project.project_type==1)
else
@option << membership.project
unless(membership.project.project_type==1)
membership.member_roles.each{|role|
if(role.role_id == 3)
@option << membership.project
end
}
end
end
# a = [1]
# @project = Project.where("id in []", a)
@user = @bid.author