i18n for outfits#destroy flashes
This commit is contained in:
parent
8c9dda37d5
commit
029373addd
3 changed files with 15 additions and 16 deletions
|
@ -28,23 +28,16 @@ class OutfitsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
if @outfit.destroy
|
@outfit.destroy
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
flash[:success] = "Outfit #{@outfit.name} successfully deleted"
|
flash[:success] = t('outfits.destroy.success',
|
||||||
|
:outfit_name => @outfit.name)
|
||||||
redirect_to current_user_outfits_path
|
redirect_to current_user_outfits_path
|
||||||
}
|
}
|
||||||
format.json { render :json => true }
|
format.json { render :json => true }
|
||||||
end
|
end
|
||||||
else
|
|
||||||
respond_to do |format|
|
|
||||||
format.html {
|
|
||||||
flash[:alert] = "Error deleting outfit. Try again?"
|
|
||||||
redirect_to current_user_outfits_path, :status => :bad_request
|
|
||||||
}
|
|
||||||
format.json { render :json => false, :status => :bad_request }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
|
|
|
@ -438,6 +438,9 @@ en-meep:
|
||||||
submit: Meemport all pets
|
submit: Meemport all pets
|
||||||
|
|
||||||
outfits:
|
outfits:
|
||||||
|
destroy:
|
||||||
|
success: Outfit "%{outfit_name}" succeessfully demeeped.
|
||||||
|
|
||||||
new:
|
new:
|
||||||
tagline: Meeps made meepy!
|
tagline: Meeps made meepy!
|
||||||
load_pet_legend: Enter your pet's meep
|
load_pet_legend: Enter your pet's meep
|
||||||
|
|
|
@ -439,6 +439,9 @@ en:
|
||||||
submit: Import all pets
|
submit: Import all pets
|
||||||
|
|
||||||
outfits:
|
outfits:
|
||||||
|
destroy:
|
||||||
|
success: Outfit "%{outfit_name}" successfully deleted.
|
||||||
|
|
||||||
new:
|
new:
|
||||||
tagline: Neopets wearables made easy!
|
tagline: Neopets wearables made easy!
|
||||||
load_pet_legend: Enter your pet's name
|
load_pet_legend: Enter your pet's name
|
||||||
|
|
Loading…
Reference in a new issue