app/views/educode_sales/activities/index.json.jbuilder in educode_sales-0.4.4 vs app/views/educode_sales/activities/index.json.jbuilder in educode_sales-0.4.5

- old
+ new

@@ -1,14 +1,20 @@ +teachers_count = 0 json.data do json.array! @activities do |d| json.id d.id json.name d.name json.days d.days json.teachers_count d.activity_teachers_count + teachers_count += d.activity_teachers_count json.return_rate d.return_rate json.students_count d.students_count || 0 json.course_rate d.course_rate json.start_at d.start_at ? d.start_at.to_s(:date) : '' end +end + +json.totalRow do + json.teachers_count teachers_count.to_s end json.code 0 json.count @activities.total_count \ No newline at end of file