diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/instances_controller.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/admin/instances_controller.rb b/app/controllers/admin/instances_controller.rb index b8f170ec2..ac93248a8 100644 --- a/app/controllers/admin/instances_controller.rb +++ b/app/controllers/admin/instances_controller.rb @@ -3,13 +3,18 @@ module Admin class InstancesController < BaseController def index - @instances = ordered_instances.page(params[:page]) + @instances = ordered_instances end private + def paginated_instances + Account.remote.by_domain_accounts.page(params[:page]) + end + helper_method :paginated_instances + def ordered_instances - Account.remote.by_domain_accounts + paginated_instances.map { |account| Instance.new(account) } end end end |