added flash notices on destroy
This commit is contained in:
parent
a65bf7a4f8
commit
4ed5c11335
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ class RepositoriesController < ApplicationController
|
|||
def destroy
|
||||
@repository.destroy
|
||||
|
||||
flash[:notice] = t("flash.repository.destroyed")
|
||||
redirect_to platform_path(@platform)
|
||||
end
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ class UsersController < ApplicationController
|
|||
|
||||
def destroy
|
||||
@user.destroy
|
||||
|
||||
flash[:notice] = t("flash.user.destroyed")
|
||||
redirect_to users_path
|
||||
end
|
||||
|
||||
|
|
|
@ -94,6 +94,8 @@ ru:
|
|||
freeze_error: Не удалось заморозить платформу, попробуйте еще раз
|
||||
unfreezed: Платформа успешно разморожена
|
||||
unfreeze_error: Не удалось разморозить платформу, попробуйте еще раз
|
||||
destroyed: Платформа успешно удалена
|
||||
|
||||
|
||||
attributes:
|
||||
password: Пароль
|
||||
|
|
Loading…
Reference in New Issue