diff --git a/app/controllers/platforms_controller.rb b/app/controllers/platforms_controller.rb index 8c7bab646..93076b746 100644 --- a/app/controllers/platforms_controller.rb +++ b/app/controllers/platforms_controller.rb @@ -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 diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 4631aab27..6ff5b357d 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -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 diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 8ccd4a02a..2e6316b7e 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -14,6 +14,7 @@ class RepositoriesController < ApplicationController def destroy @repository.destroy + flash[:notice] = t("flash.repository.destroyed") redirect_to platform_path(@platform) end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 4fb233af5..e5d8c2540 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -17,6 +17,8 @@ class UsersController < ApplicationController def destroy @user.destroy + + flash[:notice] = t("flash.user.destroyed") redirect_to users_path end diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 09d203306..261150d46 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -94,6 +94,8 @@ ru: freeze_error: Не удалось заморозить платформу, попробуйте еще раз unfreezed: Платформа успешно разморожена unfreeze_error: Не удалось разморозить платформу, попробуйте еще раз + destroyed: Платформа успешно удалена + attributes: password: Пароль