From c1542a1c806ef80a8434a5d3b989c67fec6f8df3 Mon Sep 17 00:00:00 2001 From: David Wilkie Date: Tue, 9 Aug 2022 16:53:44 +0700 Subject: [PATCH] Move pagination into partial --- app/views/administrate/application/_pagination.html.erb | 1 + app/views/administrate/application/index.html.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 app/views/administrate/application/_pagination.html.erb diff --git a/app/views/administrate/application/_pagination.html.erb b/app/views/administrate/application/_pagination.html.erb new file mode 100644 index 0000000000..608d3b6013 --- /dev/null +++ b/app/views/administrate/application/_pagination.html.erb @@ -0,0 +1 @@ +<%= paginate resources, param_name: '_page' %> diff --git a/app/views/administrate/application/index.html.erb b/app/views/administrate/application/index.html.erb index 5bd91874a1..b4754b9d3d 100644 --- a/app/views/administrate/application/index.html.erb +++ b/app/views/administrate/application/index.html.erb @@ -42,5 +42,5 @@ It renders the `_table` partial to display details about the resources. table_title: "page-title" ) %> - <%= paginate resources, param_name: '_page' %> + <%= render("pagination", resources: resources) %>