From 14793895c87ca839555f1a8ddf65fd49f58c34d5 Mon Sep 17 00:00:00 2001 From: Rikki Pitt Date: Thu, 22 Sep 2016 08:16:03 +0100 Subject: [PATCH] Add conditional to render correct pagination template This is due to a change in RailsAdmin described here sferik/rails_admin#2283 Fixes #14 --- app/views/rails_admin/main/history.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/rails_admin/main/history.html.haml b/app/views/rails_admin/main/history.html.haml index c385355..5118c19 100644 --- a/app/views/rails_admin/main/history.html.haml +++ b/app/views/rails_admin/main/history.html.haml @@ -53,6 +53,6 @@ %td= link_to(t("admin.history_rollback.table_headers.view_changes"), "#", class: "changeset", :data => {:url => url_for(action: action(:history_index, @abstract_model).action_name, model_name: @abstract_model.to_param, version_id: object.version_id)}) - unless params[:all] || !@history.respond_to?(:current_page) - = paginate(@history, theme: 'ra-twitter-bootstrap', remote: true) + = paginate(@history, theme: lookup_context.exists?('kaminari/ra-twitter-bootstrap/_paginator') ? 'ra-twitter-bootstrap' : 'twitter-bootstrap', remote: true) = link_to(t("admin.misc.show_all"), send(path_method, params.merge(all: true)), class: "show-all btn pjax") unless (tc = @history.total_count) <= @history.size || tc > 100