diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index c03f48a8d..c40e0af95 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -25,6 +25,9 @@ class GamesController < ApplicationController # @praise 判断是否点赞 # @praise 判断是否踩 def show + # 展示全部实训 + @games = @myshixun.games.includes(:challenge) + @games_count = @games.count @game_challenge = @game.challenge (@myshixun.games.count == @game_challenge.position && @game.status ==2) ? @had_done = 1 : @had_done = 0 @praise = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?", @game_challenge.id, @game_challenge.class.to_s, User.current.id).first diff --git a/app/views/games/show.html.erb b/app/views/games/show.html.erb index 1de9e3220..40696988d 100644 --- a/app/views/games/show.html.erb +++ b/app/views/games/show.html.erb @@ -5,13 +5,13 @@ '/editormd/lib/flowchart.min.js','/editormd/lib/jquery.flowchart.min.js','/editormd/editormd.js'%>