Merge branch 'dev_shixun_project' of https://git.trustie.net/jacknudt/trustieforge into dev_shixun_project

Conflicts:
	app/views/games/_game_show.html.erb
This commit is contained in:
daiao 2017-03-27 11:00:50 +08:00
commit 75b092f3c7
2 changed files with 4 additions and 2 deletions

View File

@ -20,6 +20,7 @@ class GamesController < ApplicationController
# 首次进入版本库自动打开文件
# path"" && path: @game.path
def show
logger.info("*** ###############")
game_path = (@game.path.blank? ? @game.path : @game.path.strip)
@rev = @rev.nil? ? "master" : @rev
@git_url = git_repository_url(@myshixun, "Myshixun")
@ -29,8 +30,10 @@ class GamesController < ApplicationController
@path = game_path
@file_open = true
@content = @repository.cat(@path, @rev)
logger.info("content result is ###############{@content}")
else
@entries = @repository.entries(@path, @rev)
logger.info("result is ###############{@entries.first.try(:path)}")
end
@latest_output = @game.latest_output.try(:out_put)
outputs = @game.outputs

View File

@ -51,8 +51,7 @@ class ShixunsController < ApplicationController
flash[:notice] = l(:notice_shixun_failed_exec)+ ":" + e.message
raise ActiveRecord::Rollback
respond_to do |format|
format.html{
redirect_to shixun_path(@shixun)}
format.html{redirect_to shixun_path(@shixun)}
end
end
end