mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Update pagination in Admin::ZonesController
This commit is contained in:
@@ -15,7 +15,8 @@ module Spree
|
||||
params[:q] ||= {}
|
||||
params[:q][:s] ||= "ascend_by_name"
|
||||
@search = super.ransack(params[:q])
|
||||
@zones = @search.result.page(params[:page]).per(Spree::Config[:orders_per_page])
|
||||
@pagy, @zones = pagy(@search.result, items: Spree::Config[:orders_per_page])
|
||||
@zones
|
||||
end
|
||||
|
||||
def load_data
|
||||
|
||||
Reference in New Issue
Block a user