Created
March 28, 2019 09:14
-
-
Save MaryKuz/89b784329cabc72468551b62fc785ceb to your computer and use it in GitHub Desktop.
Add error to ApplicationController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
... | |
rescue_from ActiveRecord::RecordNotFound do |exception| | |
@exception = exception | |
render :exception | |
end | |
... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment