mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-05 02:41:33 +00:00
Update pagination in Api::StatesController
This commit is contained in:
@@ -32,7 +32,7 @@ module Api
|
||||
includes(:country).order('name ASC')
|
||||
|
||||
if pagination?
|
||||
states = states.page(params[:page]).per(params[:per_page])
|
||||
_pagy, states = pagy(states, items: params[:per_page])
|
||||
end
|
||||
|
||||
states
|
||||
|
||||
Reference in New Issue
Block a user