When a user tries to join a course and is not successful, redirect them to the home page, not the courses page.
Details
In the file app/controllers/courses_controller.rb we see this code:
if roster_student.nil?
message = 'Your email did not match the email of any student on the course roster. Please check that your github email is correctly configured to match your school email and that you have verified your email address. '
return redirect_to courses_path, alert: message
end
The line return redirect_to courses_path, alert: message may be the only change needed.
When a user tries to join a course and is not successful, redirect them to the home page, not the courses page.
Details
In the file
app/controllers/courses_controller.rb
we see this code:The line
return redirect_to courses_path, alert: message
may be the only change needed.