Skip to content

Commit

Permalink
Add i18n message to edit product permission
Browse files Browse the repository at this point in the history
  • Loading branch information
anamariasosam committed Jul 22, 2016
1 parent c6a75ee commit bc7b32e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/products_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def new
# GET /products/1/edit
def edit
if current_user.id != @product.store_id
flash[:error] = "No tienes permisos para editar este producto"
flash[:error] = t('product.edit_permissions')
redirect_to root_url
end
end
Expand Down
1 change: 1 addition & 0 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
es:
product:
purchase: Actualmente puedes contactar el vendedor con su número de teléfono.
edit_permissions: No tienes permisos para editar este producto
mail_form:
attributes:
contact:
Expand Down

0 comments on commit bc7b32e

Please sign in to comment.