下一关功能

This commit is contained in:
huang 2017-03-17 17:47:04 +08:00
parent 7771f48eaf
commit 4e6a534371
2 changed files with 3 additions and 3 deletions

View File

@ -73,9 +73,9 @@ class GamesController < ApplicationController
# 自动推送下一个任务
def next_step
next_game = @game.next_game
next_game = publish_games challenge, @myshixun.id, position
next_game.update_attribute(:status, 0)
respond_to do |format|
format.html{redirect_to myshixun_game_path(next_game, :myshixun_id => @myshixun.id)}
format.js{redirect_to myshixun_game_path(next_game, :myshixun_id => @myshixun.id)}
end
end

View File

@ -6,7 +6,7 @@
<div class="content-row mr15">
<div class="content-info col-width fl ">
<div class="panel-header clearfix">
<h3 class="fl">第1关Python的初始化</h3>
<h3 class="fl">第<%= @game.stage %>关:<%= @game.subject %></h3>
<div class="fr mt5">
<a href="#"><i class="fa fa-minus font-14 mr10 fl color-grey"></i></a>
<a href="#"><i class="fa fa-minus-square font-14 fl color-grey"></i></a>