You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/helpers/shares_helper.rb

16 lines
463 B

module SharesHelper
def options_from_select_project(user)
@membership = user.memberships.all(:conditions => Project.visible_condition(User.current))
@option = []
@membership.each do |membership|
unless(membership.project.project_type==1)
#可被用户引用的项目
if user.allowed_to?(:quote_project, membership.project)
@option << membership.project
end
end
end
options_for_select(@option)
end
end