Skip to content

Commit 43814ab

Browse files
author
Harley Trung
authored
Update pagination to use params[:_page] per administrate's changes (#39)
See thoughtbot/administrate#1725 Relevant excerpt: > Using the param :page for top-level pagination (ie: index pages as opposed to has_many lists in show pages) conflicts with paginating resources whose type happens to be "Page".
1 parent c5cead9 commit 43814ab

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

bin/setup

100644100755
File mode changed.

lib/administrate/base_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def index
66
resources = index_resources
77
resources = apply_collection_includes(resources)
88
resources = order.apply(resources)
9-
resources = resources.page(params[:page]).per(records_per_page)
9+
resources = resources.page(params[:_page]).per(records_per_page)
1010

1111
respond_to do |format|
1212
format.json { render_index_json(resources) }

0 commit comments

Comments
 (0)