From c4a4329d5e44dc98b24f1d344a3532054b1539e0 Mon Sep 17 00:00:00 2001 From: Ben Thorner Date: Fri, 10 Jul 2020 16:44:51 +0100 Subject: [PATCH] Enable Rails/SaveBang This is already enabled in a few repos: - https://github.com/alphagov/whitehall/commit/7fb77d243229dd1d467ab159c49ca91e516a80c0 - https://github.com/alphagov/content-publisher/commit/a645919a4976ea658ae8b2608f48eb6a84fbd675 - https://github.com/alphagov/local-links-manager/commit/ac607b4888fecf55b741099428ef18f06e08fc61 --- config/rails.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/rails.yml b/config/rails.yml index e2b74637..7edfaa10 100644 --- a/config/rails.yml +++ b/config/rails.yml @@ -79,3 +79,9 @@ Rails/HasManyOrHasOneDependent: # little value to many developers. Rails/OutputSafety: Enabled: false + +# We seldom check the return value of 'update' to see if +# the operation was successful. Since we assume success, we +# should raise an exception if this is not the case. +Rails/SaveBang: + Enabled: true