This commit is contained in:
rgarcia
2018-02-09 22:08:52 +01:00
parent 2d3c4e1fbd
commit 00c965b715
31 changed files with 206 additions and 158 deletions

View File

@@ -19,8 +19,8 @@ class Admin::ValuatorGroupsController < Admin::BaseController
def create
@group = ValuatorGroup.new(group_params)
if @group.save
notice = t("user_group.notice.created")
redirect_to admin_valuator_groups_path, notice: notice
notice = t("flash.actions.create.valuator_group")
redirect_to [:admin, :valuator_groups], notice: notice
else
render :new
end
@@ -29,7 +29,7 @@ class Admin::ValuatorGroupsController < Admin::BaseController
def update
@group = ValuatorGroup.find(params[:id])
if @group.update(group_params)
notice = t("user_group.notice.updated")
notice = t("flash.actions.update.valuator_group")
redirect_to [:admin, @group], notice: notice
else
render :edit
@@ -39,8 +39,8 @@ class Admin::ValuatorGroupsController < Admin::BaseController
def destroy
@group = ValuatorGroup.find(params[:id])
@group.destroy
notice = t("user_group.notice.destroyed")
redirect_to admin_valuator_groups_path, notice: notice
notice = t("flash.actions.destroy.valuator_group")
redirect_to [:admin, :valuator_groups], notice: notice
end
private