导入数据

This commit is contained in:
nieguanghui 2013-08-13 09:57:57 +08:00
parent 0027ca8d22
commit 2dc1d5e935
1 changed files with 9 additions and 9 deletions

View File

@ -87,15 +87,15 @@ class ProjectsController < ApplicationController
@offset, @limit = api_offset_and_limit({:limit => 10}) @offset, @limit = api_offset_and_limit({:limit => 10})
@projects = Project.visible @projects = Project.visible
# @projects.each do |project| @projects.each do |project|
# @admin = project.users_by_role[Role.find(3)] @admin = project.users_by_role[Role.find(3)]
# unless @admin.nil? unless @admin.nil?
# @admin.each do |user| @admin.each do |user|
# ProjectInfo.create(:user_id => user.id, :project_id => project.id) ProjectInfo.create(:user_id => user.id, :project_id => project.id)
# end end
#
# end end
# end end
@projects = Project.visible.like(params[:name]) if params[:name].present? @projects = Project.visible.like(params[:name]) if params[:name].present?
@project_count = @projects.count @project_count = @projects.count
@project_pages = Paginator.new @project_count, @limit, params['page'] @project_pages = Paginator.new @project_count, @limit, params['page']