Clean up
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user