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:


ActiveRecord:
* .where
* Scopes
* when record not found

Table Of Contents
2 ActiveRecord
3 Views
19 Caching
23 Rails 5
25 Mongoid
26 Gems
55 CSV