回复问题

dev_local_scyd
daiao 5 years ago
parent ce9389c2fe
commit c7bdc75438

@ -99,7 +99,6 @@ class DiscussesController < ApplicationController
:root_id => @discuss.root_id || params[:id], :parent_id => params[:id], :praise_count => 0,
:challenge_id => @discuss.challenge_id, :dis_id => @discuss.dis_id,
:dis_type => @discuss.dis_type, :position => @discuss.position)
@discuss.content = content_safe(@discuss.content)
rescue Exception => e
uid_logger_error("reply discuss failed : #{e.message}")
raise Educoder::TipException.new("回复评论异常")

@ -30,7 +30,7 @@ class SubjectsController < ApplicationController
if search
subjects = subjects.where("subjects.name like ?", "%#{search}%")
end
@subjects = subjects.select("subjects.*, sum(shixuns.myshixuns_count) AS myshixun_member_count").group("subjects.id").order("myshixun_member_count DESC")
@subjects = subjects.select("select subjects.*, sum(shixuns.myshixuns_count) AS myshixun_member_count").group("subjects.id").order("myshixun_member_count DESC")
else
# 我的路径
if reorder == "mine"

Loading…
Cancel
Save