fixes gendered translations

This commit is contained in:
Juanjo Bazán
2016-01-21 17:09:32 +01:00
parent edc3be1d8b
commit 9c6ab40623
4 changed files with 13 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ module CommentableActions
if @resource.save_with_captcha
track_event
redirect_path = url_for(controller: controller_name, action: :show, id: @resource.id)
redirect_to redirect_path, notice: t('flash.actions.create.notice', resource_name: "#{resource_name.capitalize}")
redirect_to redirect_path, notice: t("flash.actions.create.#{resource_name.underscore}")
else
load_featured_tags
set_resource_instance
@@ -51,7 +51,7 @@ module CommentableActions
def update
resource.assign_attributes(strong_params)
if resource.save_with_captcha
redirect_to resource, notice: t('flash.actions.update.notice', resource_name: "#{resource_name.capitalize}")
redirect_to resource, notice: t("flash.actions.update.#{resource_name.underscore}")
else
load_featured_tags
set_resource_instance