added flash notices on destroy

This commit is contained in:
Timothy N. Tsvetkov 2011-03-31 06:00:21 +04:00
parent a65bf7a4f8
commit 4ed5c11335
5 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,4 @@
class PlatformsController < ApplicationController
before_filter :authenticate_user!
@ -53,6 +54,8 @@ class PlatformsController < ApplicationController
def destroy
Platform.destroy params[:id]
flash[:notice] = t("flash.platform.destroyed")
redirect_to root_path
end

View File

@ -25,6 +25,7 @@ class ProjectsController < ApplicationController
def destroy
@project.destroy
flash[:notice] = t("flash.project.destroyed")
redirect_to platform_repository_path(@platform, @repository)
end

View File

@ -14,6 +14,7 @@ class RepositoriesController < ApplicationController
def destroy
@repository.destroy
flash[:notice] = t("flash.repository.destroyed")
redirect_to platform_path(@platform)
end

View File

@ -17,6 +17,8 @@ class UsersController < ApplicationController
def destroy
@user.destroy
flash[:notice] = t("flash.user.destroyed")
redirect_to users_path
end

View File

@ -94,6 +94,8 @@ ru:
freeze_error: Не удалось заморозить платформу, попробуйте еще раз
unfreezed: Платформа успешно разморожена
unfreeze_error: Не удалось разморозить платформу, попробуйте еще раз
destroyed: Платформа успешно удалена
attributes:
password: Пароль