Commit 0a7f3b80 authored by Toon Claes's avatar Toon Claes Committed by Stan Hu

Extract local variable into private method

parent 7a6f9958
...@@ -6,8 +6,6 @@ class Admin::Geo::ProjectsController < Admin::Geo::ApplicationController ...@@ -6,8 +6,6 @@ class Admin::Geo::ProjectsController < Admin::Geo::ApplicationController
before_action :limited_actions_message! before_action :limited_actions_message!
def index def index
finder = ::Geo::ProjectRegistryStatusFinder.new
@registries = case params[:sync_status] @registries = case params[:sync_status]
when 'never' when 'never'
finder.never_synced_projects.page(params[:page]) finder.never_synced_projects.page(params[:page])
...@@ -75,4 +73,8 @@ class Admin::Geo::ProjectsController < Admin::Geo::ApplicationController ...@@ -75,4 +73,8 @@ class Admin::Geo::ProjectsController < Admin::Geo::ApplicationController
def redirect_back_or_admin_geo_projects(params) def redirect_back_or_admin_geo_projects(params)
redirect_back_or_default(default: admin_geo_projects_path, options: params) redirect_back_or_default(default: admin_geo_projects_path, options: params)
end end
def finder
@finder ||= ::Geo::ProjectRegistryStatusFinder.new
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment