app/views/educode_sales/teachers/index.json.jbuilder in educode_sales-0.2.5 vs app/views/educode_sales/teachers/index.json.jbuilder in educode_sales-0.2.6
- old
+ new
@@ -15,10 +15,10 @@
# a_id = EducodeSales::TeacherFollow.order(created_at: :desc).find_by(teacher_id: d.id).present? ? EducodeSales::TeacherFollow.order(created_at: :desc).find_by(teacher_id: d.id).attitude_id : 73
json.attitude EducodeSales::TeacherFollow.find_by(teacher_id: d.id).present? ? EducodeSales::Common.find(EducodeSales::TeacherFollow.order(created_at: :desc).find_by(teacher_id: d.id).attitude_id).name : ''
json.courses_count d.user_id ? Course.joins(:course_members).where(course_members: {user_id: d.user_id}).distinct("course_id").count : 0
json.actives d.actives
json.students d.students_count
- json.regist_at d.regist_at && d.user_id ? d.regist_at.to_s(:date) : ''
+ json.regist_at d.user.present? ? d.user.created_on.to_s(:date) : ''
json.teacher_used d.teacher_used_of_department
end
end
json.code 0
json.count @teachers.total_count
\ No newline at end of file