newyslclassrooms
daiao 5 years ago
parent 9e7785e673
commit 6270a90b0b

@ -155,11 +155,10 @@ class ChallengesController < ApplicationController
def index def index
uid_logger("identifier: #{params}") uid_logger("identifier: #{params}")
#bases_column = "challenges.id, challenges.subject, challenges.st, challenges.score, challenges.position, base_columns = "challenges.id, challenges.subject, challenges.st, challenges.score, challenges.position,
# challenges.shixun_id, games.identifier, games.status" challenges.shixun_id, games.identifier, games.status"
#@challenges = @shixun.challenges.joins(:games).where(games: {user_id: current_user.id}) @challenges = @shixun.challenges.joins(:games).where(games: {user_id: current_user.id})
# .select(bases_column) .select(base_columns)
@challenges = @shixun.challenges.fields_for_list
@editable = @shixun.status == 0 # before_action有判断权限如果没发布则肯定是管理人员 @editable = @shixun.status == 0 # before_action有判断权限如果没发布则肯定是管理人员
@user = current_user @user = current_user
@shixun.increment!(:visits) @shixun.increment!(:visits)

Loading…
Cancel
Save