Gitlab.com integration: code folding

This commit is contained in:
Valery Sizov
2015-02-05 12:50:34 -08:00
parent 33349dd549
commit 592ed8738c
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ class Import::GithubController < ApplicationController
@already_added_projects = current_user.created_projects.where(import_type: "github")
already_added_projects_names = @already_added_projects.pluck(:import_source)
@repos.reject!{|repo| already_added_projects_names.include? repo.full_name}
@repos.reject!{ |repo| already_added_projects_names.include? repo.full_name }
end
def jobs
+2 -2
View File
@@ -16,11 +16,11 @@ class Import::GitlabController < ApplicationController
@already_added_projects = current_user.created_projects.where(import_type: "gitlab")
already_added_projects_names = @already_added_projects.pluck(:import_source)
@repos.to_a.reject!{|repo| already_added_projects_names.include? repo["path_with_namespace"]}
@repos.to_a.reject!{ |repo| already_added_projects_names.include? repo["path_with_namespace"] }
end
def jobs
jobs = current_user.created_projects.where(import_type: "gitlab").to_json(:only => [:id, :import_status])
jobs = current_user.created_projects.where(import_type: "gitlab").to_json(only: [:id, :import_status])
render json: jobs
end