Skip to content

Commit

Permalink
Do not discard flash message
Browse files Browse the repository at this point in the history
  • Loading branch information
coorasse committed Nov 21, 2024
1 parent ea2b218 commit 452dbf3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/controllers/moirai/translation_files_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@ def open_pr
def handle_update(translation)
if translation_params[:value].blank? || translation_same_as_current?
translation.destroy
flash.notice = "Translation #{translation.key} was successfully deleted."
respond_to do |format|
format.json do
flash.discard
render json: {
fallback_translation: get_fallback_translation
}
end
format.html do
flash.notice = "Translation #{translation.key} was successfully deleted."
redirect_to_translation_file(translation.file_path)
end
end
Expand Down

0 comments on commit 452dbf3

Please sign in to comment.