Non exist course 404 error
MODIFY
app/controllers/application_controller.rb
app/controllers/application_controller.rb
@@ -141,8 +141,7 @@ protected
@course = Course.find_by(name: course_name) if course_name
unless @course
- flash[:error] = "Course #{params[:course_name]} does not exist!"
- redirect_to(controller: :home, action: :error) && return
+ render :file => "#{Rails.root}/public/404.html", :status => 404
end
# set course logger

Non exist course 404 error (#768)