You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
408 B

  1. # frozen_string_literal: true
  2. module Admin
  3. class InstancesController < BaseController
  4. def index
  5. @instances = ordered_instances
  6. end
  7. private
  8. def paginated_instances
  9. Account.remote.by_domain_accounts.page(params[:page])
  10. end
  11. helper_method :paginated_instances
  12. def ordered_instances
  13. paginated_instances.map { |account| Instance.new(account) }
  14. end
  15. end
  16. end