diff options
author | Robert Speicher <robert@gitlab.com> | 2016-03-08 17:27:51 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-03-08 17:27:51 +0000 |
commit | 24663e80953ce48db600c17aa7baa91d8e38680c (patch) | |
tree | 12511133d7abe777a4f195ee3cb712e14a55c2d3 | |
parent | c3eb2458749952e6cca4d1a1a49351f98f7feeaf (diff) | |
parent | 6ac68d8cb0477367fbf9642526c459b87b116d40 (diff) | |
download | gitlab-ce-24663e80953ce48db600c17aa7baa91d8e38680c.tar.gz |
Merge branch 'improve/3102-memoize-group-instance-variable-in-admin-groups-controller' into 'master'
Remove instance variable `@group` multiple assignment
See merge request !3127
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/controllers/admin/groups_controller.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG index a98bdd26f74..1c09111443a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,7 @@ v 8.6.0 (unreleased) - Fix issue when pushing to projects ending in .wiki - Fix avatar stretching by providing a cropping feature (Johann Pardanaud) - Don't load all of GitLab in mail_room + - Memoize @group in Admin::GroupsController (Yatish Mehta) - Indicate how much an MR diverged from the target branch (Pierre de La Morinerie) - Strip leading and trailing spaces in URL validator (evuez) - Return empty array instead of 404 when commit has no statuses in commit status API diff --git a/app/controllers/admin/groups_controller.rb b/app/controllers/admin/groups_controller.rb index 4d3e48f7f81..668396a0f20 100644 --- a/app/controllers/admin/groups_controller.rb +++ b/app/controllers/admin/groups_controller.rb @@ -55,7 +55,7 @@ class Admin::GroupsController < Admin::ApplicationController private def group - @group = Group.find_by(path: params[:id]) + @group ||= Group.find_by(path: params[:id]) end def group_params |