You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
config.page_param do |params|
params[:page][:number]
end
config.per_page_param do |params|
params[:page][:size]
end
I have 40 records. I want to get record beginning with id 11. When I pass pages parameters : page: {number: 2, per_page: 10} I have got records beginning with id: 1
paginate json: users, per_page: params[:page][:size], page: params[:page][:number]
What am I doing wrong?
The text was updated successfully, but these errors were encountered:
If you're specifying the param names in your configuration, you should only have to call paginate json: users. Can you try removing the other arguments and seeing if that works?
This is my config of pagination:
I have 40 records. I want to get record beginning with id 11. When I pass pages parameters : page: {number: 2, per_page: 10} I have got records beginning with id: 1
paginate json: users, per_page: params[:page][:size], page: params[:page][:number]
What am I doing wrong?
The text was updated successfully, but these errors were encountered: