Closed provostprovost closed 10 years ago
undefined method `first' for nil:NilClass
@classrooms.each do |classroom| @students[classroom.id] = Tyto.db.get_students_in_classroom(classroom.id) @assignments[classroom.id] = Tyto.db.get_assignments_for_classroom(classroom.id, @students[classroom.id].first.id) @studenthomework[classroom.id] = {} @students[classroom.id].each do |x| @studenthomework[classroom.id][x.id] = Tyto.db.get_assignments_for_classroom(classroom.id, x.id)
Rails.root: /Users/brianprovost/code/mks/tyto/web
Application Trace | Framework Trace | Full Trace app/controllers/teachers_controller.rb:37:in block in show' app/controllers/teachers_controller.rb:35:ineach' app/controllers/teachers_controller.rb:35:in `show'
block in show' app/controllers/teachers_controller.rb:35:in
Fixed. Tested by signing in with need seed teacher username: john@teacher.com password: password1. Seems to be resolved.
undefined method `first' for nil:NilClass
Rails.root: /Users/brianprovost/code/mks/tyto/web
Application Trace | Framework Trace | Full Trace app/controllers/teachers_controller.rb:37:in
block in show' app/controllers/teachers_controller.rb:35:in
each' app/controllers/teachers_controller.rb:35:in `show'