diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2019-04-15 18:52:12 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-04-15 18:52:12 +0300 |
commit | 57cdf56aa7df41b013d9c47c6b12bf5a9e20e4f4 (patch) | |
tree | aa4e6e8aa09f2bc845cd36a7abcd7cb00b694c64 /app/controllers | |
parent | fcb70d9bbbc14dc695fa87dc1dea5fa7fe78f6d2 (diff) | |
parent | 650f40865e5d8136cb366fbde689c4100aafb0c5 (diff) |
Merge branch 'forbid-the-usage-of-reload' into 'master'
Forbid the usage of reload
Closes #60218
See merge request gitlab-org/gitlab-ce!27125
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/projects_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/profiles/passwords_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/imports_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects_controller.rb | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index fb135d1a32c..aeff0c96b64 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -40,7 +40,7 @@ class Admin::ProjectsController < Admin::ApplicationController namespace = Namespace.find_by(id: params[:new_namespace_id]) ::Projects::TransferService.new(@project, current_user, params.dup).execute(namespace) - @project.reload + @project.reset redirect_to admin_project_path(@project) end # rubocop: enable CodeReuse/ActiveRecord diff --git a/app/controllers/profiles/passwords_controller.rb b/app/controllers/profiles/passwords_controller.rb index a0391d677c4..7038447581c 100644 --- a/app/controllers/profiles/passwords_controller.rb +++ b/app/controllers/profiles/passwords_controller.rb @@ -55,7 +55,7 @@ class Profiles::PasswordsController < Profiles::ApplicationController flash[:notice] = "Password was successfully updated. Please login with it" redirect_to new_user_session_path else - @user.reload + @user.reset render 'edit' end end diff --git a/app/controllers/projects/imports_controller.rb b/app/controllers/projects/imports_controller.rb index 8ee0bd26daf..4640be015de 100644 --- a/app/controllers/projects/imports_controller.rb +++ b/app/controllers/projects/imports_controller.rb @@ -14,7 +14,7 @@ class Projects::ImportsController < Projects::ApplicationController def create if @project.update(import_params) - @project.import_state.reload.schedule + @project.import_state.reset.schedule end redirect_to project_import_path(@project) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 62b97fc2590..48f4d7a586d 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -237,7 +237,7 @@ class ProjectsController < Projects::ApplicationController def toggle_star current_user.toggle_star(@project) - @project.reload + @project.reset render json: { star_count: @project.star_count |