about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2017-10-24 18:56:57 -0500
committerDavid Yip <yipdw@member.fsf.org>2017-10-24 18:56:57 -0500
commitd9485e6497b46aa16d8d9399389fc614fc5f21eb (patch)
tree3fe45297c36b0c7de4a8584cf2c370ea33d22c3b /app
parentd5c8ebe205d1bacf056d5801a1cd7ccc874f02ae (diff)
Assume Glitch::KeywordMute#destroy! works and error out if it doesn't.
There's nothing useful we can display if the destroy action messes up,
so might as well assert it does and complain loudly if it doesn't.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/settings/keyword_mutes_controller.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/controllers/settings/keyword_mutes_controller.rb b/app/controllers/settings/keyword_mutes_controller.rb
index c63626acd..f79e1b320 100644
--- a/app/controllers/settings/keyword_mutes_controller.rb
+++ b/app/controllers/settings/keyword_mutes_controller.rb
@@ -33,12 +33,9 @@ class Settings::KeywordMutesController < ApplicationController
   end
 
   def destroy
-    if @keyword_mute.destroy
-      redirect_to settings_keyword_mutes_path, notice: I18n.t('generic.changes_saved_msg')
-    else
-      # FIXME
-      redirect_to settings_keyword_mutes_path, notice: "huh that didn't work right"
-    end
+    @keyword_mute.destroy!
+
+    redirect_to settings_keyword_mutes_path, notice: I18n.t('generic.changes_saved_msg')
   end
 
   def destroy_all