diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index f2744f7f9..a71405f75 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -39,7 +39,7 @@ class GamesController < ApplicationController @content = Base64.decode64(file_content) unless file_content.blank? end if @content.nil? || @type == "root" - @path = @type == "root" ? "" : @path + @path = "" @entries = @repository.entries(@path, @rev) end @@ -65,7 +65,7 @@ class GamesController < ApplicationController # @had_done 1 已通关 (@myshixun.games.count == @game_challenge.position && @game.status ==2) ? @had_done = 1 : @had_done = 0 # 异常结果 - @latest_output = @error_position.try(out_put) + @latest_output = error_position.try(:out_put) # @latest_output = @game.latest_output.try(:expect_output) respond_to do |format| format.html diff --git a/app/views/games/_repository.html.erb b/app/views/games/_repository.html.erb index d5aef2ca3..c2739a980 100644 --- a/app/views/games/_repository.html.erb +++ b/app/views/games/_repository.html.erb @@ -11,7 +11,7 @@