module FriendlyErrors

Private Instance Methods

record_not_found(ex) click to toggle source

called when an ActiveRecord::RecordNotFound exception is caught

# File lib/friendly_errors.rb, line 19
def record_not_found(ex)
  render :file => File.join(Rails.root, 'public', '404.html'), :status => 404, :layout => nil
end
redirect_back_error() click to toggle source

called when an ActionController::RedirectBackError exception is caught

# File lib/friendly_errors.rb, line 24
def redirect_back_error
  redirect_to root_url
end