mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Per review, don't use one line rescue
One line rescue will rescue any exception and doesn't allow for rescuing specific exception: https://thoughtbot.com/blog/don-t-inline-rescue-in-ruby
This commit is contained in:
@@ -78,4 +78,8 @@ Flipper::UI.configure do |config|
|
||||
end
|
||||
|
||||
# Add known feature toggles. This may fail if the database isn't setup yet.
|
||||
OpenFoodNetwork::FeatureToggle.setup! rescue ActiveRecord::StatementInvalid
|
||||
begin
|
||||
OpenFoodNetwork::FeatureToggle.setup!
|
||||
rescue ActiveRecord::StatementInvalid
|
||||
nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user