Permalink
Browse files

Abstract flash error message string

  • Loading branch information...
1 parent 221a57d commit 1ad428f1e0e35429aabe0160b45a373f866bc8b0 @jtwalters committed Mar 16, 2012
@@ -6,7 +6,7 @@ class Admin::StoreCreditsController < Admin::ResourceController
private
def check_amounts
if (@store_credit.remaining_amount < @store_credit.amount)
- flash[:error] = "Can't be edit, b/c already was used."
+ flash[:error] = I18n.t(:cannot_edit_used)
redirect_to admin_store_credits_path
end
end
@@ -14,3 +14,4 @@ en:
you_have_store_credit: "You have %{amount} of store credits"
was_fully_used: "was fully used"
was_partially_used: "was partially used"
+ cannot_edit_used: "Cannot be edited because it has been used"
@@ -14,3 +14,4 @@ fr-FR:
you_have_store_credit: "Vous avez un avoir de %{amount}."
was_fully_used: "on été totalement utilisés"
was_partially_used: "on été partialement utilisés"
+ cannot_edit_used: "Cannot be edited because it has been used"
@@ -14,6 +14,7 @@ ru:
you_have_store_credit: "Ваш суммарный бонус составляет %{amount}"
was_fully_used: "был полностью использован"
was_partially_used: "был частично использован"
+ cannot_edit_used: "Cannot be edited because it has been used"
activerecord:
attributes:

0 comments on commit 1ad428f

Please sign in to comment.