0
0
Fork 0

Add instance search feature (#4925)

This commit is contained in:
nullkal 2017-09-13 19:30:07 +09:00 committed by Eugen Rochko
parent 9e2ff3ef71
commit da77f65c46
4 changed files with 50 additions and 1 deletions

View file

@ -14,8 +14,12 @@ module Admin
private
def filtered_instances
InstanceFilter.new(filter_params).results
end
def paginated_instances
Account.remote.by_domain_accounts.page(params[:page])
filtered_instances.page(params[:page])
end
helper_method :paginated_instances
@ -27,5 +31,11 @@ module Admin
def subscribeable_accounts
Account.with_followers.remote.where(domain: params[:by_domain])
end
def filter_params
params.permit(
:domain_name
)
end
end
end