dev_jupyter
daiao 5 years ago
parent 39ccb53729
commit 6e528448a6

@ -464,9 +464,6 @@ class SubjectsController < ApplicationController
elsif params[:type] == "user_info"
@subject.subject_user_infos
else
select_sql = "count(subject_course_records.*) total, sum(course_count) course_count, sum(student_count) student_count, " +
"sum(choice_shixun_num) choice_shixun_num, sum(choice_shixun_frequency) choice_shixun_frequency"
@total = @subject.subject_course_records.select("#{select_sql}").first
@subject.subject_course_records
end

@ -4,5 +4,5 @@ json.data do
json.subject_info @subject.subject_record
json.other_info @data
json.total_count @data_count
json.total @total
# json.total @total
end
Loading…
Cancel
Save