Skip to content

Commit

Permalink
Add conditional to render correct pagination template
Browse files Browse the repository at this point in the history
This is due to a change in RailsAdmin described here
railsadminteam/rails_admin#2283

Fixes #14
  • Loading branch information
rikkipitt committed Sep 22, 2016
1 parent f8529f1 commit 1479389
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/rails_admin/main/history.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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] || [email protected]_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

0 comments on commit 1479389

Please sign in to comment.