Skip to content

Commit 0f0d111

Browse files
committed
added ability update success flash
1 parent 8db0056 commit 0f0d111

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

app/controllers/abilities_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def edit; end
1919
def update
2020
if @ability.update(ability_update_params)
2121
do_delete_draft(current_user, URI(request.referer || '').path)
22+
flash[:success] = I18n.t('abilities.success.update_generic')
2223
redirect_to ability_path(id: @ability.internal_id)
2324
else
2425
render :edit, status: :bad_request

config/locales/strings/en.abilities.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ en:
55
Description
66
unsaved_changes_confirmation: >
77
Any unsaved changes will be lost. Are you sure?
8+
success:
9+
update_generic: >
10+
Ability successfully updated.

0 commit comments

Comments
 (0)