Skip to content

Commit

Permalink
Added flash message for manage fosters create action (#1207)
Browse files Browse the repository at this point in the history
  • Loading branch information
atbalaji authored Dec 2, 2024
1 parent 39c96bf commit f24f961
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def create

if @foster.save
FosterMailer.reminder(@foster).deliver_later
flash[:success] = t(".success", name: @foster.pet.name)
redirect_to action: :index
else
@pets = Pet.fosterable.order(:name)
Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@ en:
success: "Adoption reverted & application set to 'Withdrawn'"
error: "Failed to revert adoption"
manage_fosters:
create:
success: "Foster for %{name} successfully created."
update:
success: "Foster for %{name} successfully updated."
destroy:
Expand Down

0 comments on commit f24f961

Please sign in to comment.