Merge remote-tracking branch 'origin/develop' into develop

chromesetting
杨树明 5 years ago
commit 2711e8f660

@ -10,6 +10,7 @@ class SubjectsController < ApplicationController
include ApplicationHelper
include SubjectsHelper
include GitCommon
def index
@tech_system = current_laboratory.subject_repertoires
@ -219,6 +220,13 @@ class SubjectsController < ApplicationController
@shixun = Shixun.create!(name: params[:name], user_id: current_user.id, identifier: identifier)
# 添加合作者
@shixun.shixun_members.create!(user_id: current_user.id, role: 1)
# 创建长字段
ShixunInfo.create!(shixun_id: @shixun.id)
# 创建版本库
repo_path = repo_namespace(current_user.login, identifier)
GitService.add_repository(repo_path: repo_path)
# todo: 为什么保存的时候要去除后面的.git呢??
@shixun.update_column(:repo_name, repo_path.split(".")[0])
end
end

Loading…
Cancel
Save