-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KBP-140 #time 10m - Code was improved
- Loading branch information
hamdibayhan
committed
Nov 21, 2017
1 parent
1fa9310
commit f058b96
Showing
3 changed files
with
7 additions
and
5 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
|
||
rescue_from Exception, with: :server_error if Rails.env.production? or Rails.env.staging? | ||
rescue_from ActiveRecord::RecordNotFound, with: :page_not_found if Rails.env.production? or Rails.env.staging? | ||
rescue_from ActionController::RoutingError, with: :page_not_found if Rails.env.production? or Rails.env.staging? | ||
|
||
if Rails.env.production? || Rails.env.staging? | ||
rescue_from Exception, with: :server_error | ||
rescue_from ActiveRecord::RecordNotFound, with: :page_not_found | ||
rescue_from ActionController::RoutingError, with: :page_not_found | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
if Rails.env.production? or Rails.env.staging? | ||
if Rails.env.production? || Rails.env.staging? | ||
match '*unmatched_route', to: 'application#page_not_found', via: :all | ||
end |