Add Instance class to list admin records (#3443)
This commit is contained in:
parent
b25e42a77f
commit
a132332b86
3 changed files with 21 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue