导入数据
This commit is contained in:
parent
0027ca8d22
commit
2dc1d5e935
|
@ -87,15 +87,15 @@ class ProjectsController < ApplicationController
|
|||
|
||||
@offset, @limit = api_offset_and_limit({:limit => 10})
|
||||
@projects = Project.visible
|
||||
# @projects.each do |project|
|
||||
# @admin = project.users_by_role[Role.find(3)]
|
||||
# unless @admin.nil?
|
||||
# @admin.each do |user|
|
||||
# ProjectInfo.create(:user_id => user.id, :project_id => project.id)
|
||||
# end
|
||||
#
|
||||
# end
|
||||
# end
|
||||
@projects.each do |project|
|
||||
@admin = project.users_by_role[Role.find(3)]
|
||||
unless @admin.nil?
|
||||
@admin.each do |user|
|
||||
ProjectInfo.create(:user_id => user.id, :project_id => project.id)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
@projects = Project.visible.like(params[:name]) if params[:name].present?
|
||||
@project_count = @projects.count
|
||||
@project_pages = Paginator.new @project_count, @limit, params['page']
|
||||
|
|
Loading…
Reference in New Issue