mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
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.
This commit is contained in:
parent
d5c8ebe205
commit
d9485e6497
@ -33,12 +33,9 @@ class Settings::KeywordMutesController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
if @keyword_mute.destroy
|
@keyword_mute.destroy!
|
||||||
redirect_to settings_keyword_mutes_path, notice: I18n.t('generic.changes_saved_msg')
|
|
||||||
else
|
redirect_to settings_keyword_mutes_path, notice: I18n.t('generic.changes_saved_msg')
|
||||||
# FIXME
|
|
||||||
redirect_to settings_keyword_mutes_path, notice: "huh that didn't work right"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy_all
|
def destroy_all
|
||||||
|
Loading…
Reference in New Issue
Block a user