|
|
|
@ -487,7 +487,7 @@ class CompetitionsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
if params[:competition_module]
|
|
|
|
|
@competition.competition_modules.where(:id => params[:competition_module], :md_edit => false).update_all(:hidden => 0)
|
|
|
|
|
none_modules = @competition.competition_modules.where("name != '首页' and md_edit = false").map(&:id).join(",").split(",") - params[:competition_module]
|
|
|
|
|
none_modules = @competition.competition_modules.where("name != '首页' and md_edit = false").pluck(:id) - params[:competition_module].map(&:to_i)
|
|
|
|
|
@competition.competition_modules.where(:id => none_modules).update_all(:hidden => 1)
|
|
|
|
|
end
|
|
|
|
|
if params[:name]
|
|
|
|
|