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.
18 lines
406 B
18 lines
406 B
2 years ago
|
class HousingProvidersController < ApplicationController
|
||
|
include Pagy::Backend
|
||
|
include Modules::SearchFilter
|
||
|
|
||
|
def index
|
||
|
all_organisations = Organisation.order(:name)
|
||
|
@pagy, @organisations = pagy(filtered_collection(all_organisations, search_term))
|
||
|
@searched = search_term.presence
|
||
|
@total_count = all_organisations.size
|
||
|
end
|
||
|
|
||
|
private
|
||
|
|
||
|
def search_term
|
||
|
params["search"]
|
||
|
end
|
||
|
end
|