diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 9fad64ad3..55c4dac72 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -852,12 +852,16 @@ class ProjectsController < ApplicationController end end - # 项目收藏 def store_mine member = Member.where(:project_id => params[:id], :user_id => User.current.id).first member.try(:is_collect) == 1 ? member.update_column(:is_collect, 0) : member.update_column(:is_collect, 1) end + # 项目收藏 + def enshrine + @stores = Member.where(:project_id => params[:id], :is_collect => 1).includes(:user) + end + #加入私有项目 def join_project respond_to do |format| diff --git a/app/views/projects/_applied_status.html.erb b/app/views/projects/_applied_status.html.erb index 79fa9fee8..414449eb8 100644 --- a/app/views/projects/_applied_status.html.erb +++ b/app/views/projects/_applied_status.html.erb @@ -18,7 +18,9 @@ <% else %> <% my_stores = Member.where(:project_id => @project.id, :is_collect => 1).count %> -