问卷的添加分类类型

dev_local_cqdsj
SylorHuang 5 years ago
parent c94ef06a66
commit eeb16d7e09

@ -1068,7 +1068,7 @@ class PollsController < ApplicationController
#筛选/分类,排序 #筛选/分类,排序
order = params[:order] order = params[:order]
# b_sort = params[:sort] || "desc" order_type = params[:order_type] || "desc"
choose_type = params[:commit_status] choose_type = params[:commit_status]
group_id = params[:poll_group_id] group_id = params[:poll_group_id]
search_content = params[:search] search_content = params[:search]
@ -1095,9 +1095,9 @@ class PollsController < ApplicationController
poll_users_joins = @poll_users_list.joins(user: :user_extension) poll_users_joins = @poll_users_list.joins(user: :user_extension)
if order == "student_id" if order == "student_id"
@poll_users_list = poll_users_joins.order("user_extensions.student_id DESC") @poll_users_list = poll_users_joins.order("user_extensions.student_id #{order_type}")
else else
@poll_users_list = poll_users_joins.order("end_at DESC") @poll_users_list = poll_users_joins.order("end_at #{order_type}")
end end
@poll_users_size = @poll_users_list.count @poll_users_size = @poll_users_list.count

Loading…
Cancel
Save