|
|
@ -164,7 +164,11 @@ class ChallengesController < ApplicationController
|
|
|
|
|
|
|
|
|
|
|
|
@challenges = @shixun.challenges.joins(join_sql).select(base_columns).uniq
|
|
|
|
@challenges = @shixun.challenges.joins(join_sql).select(base_columns).uniq
|
|
|
|
|
|
|
|
|
|
|
|
@shixun_modify = (@challenges.select{|c| c.status.present? }.size == @challenges.size)
|
|
|
|
@shixun_modify = (@challenges.select{|c| !c.status.nil? }.size != @challenges.size)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
logger.info("########shixun_modify:#{@shixun_modify}")
|
|
|
|
|
|
|
|
logger.info("########challenges.size:#{@challenges.size}")
|
|
|
|
|
|
|
|
logger.info("########challenge_inspect:#{@challenges.inspect}")
|
|
|
|
|
|
|
|
|
|
|
|
#@challenges = @shixun.challenges.fields_for_list
|
|
|
|
#@challenges = @shixun.challenges.fields_for_list
|
|
|
|
@editable = @shixun.status == 0 # before_action:有判断权限,如果没发布,则肯定是管理人员
|
|
|
|
@editable = @shixun.status == 0 # before_action:有判断权限,如果没发布,则肯定是管理人员
|
|
|
|