when record not found

suggest change

Rescue from record not found error instead of showing an exception or white page:

class ApplicationController < ActionController::Base
  
  # ... your other stuff here 

  rescue_from ActiveRecord::RecordNotFound do |exception|
    redirect_to root_path, 404, alert: 'Record not found'
  end
end

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents