Skip to content

Commit

Permalink
Merge pull request #2 from byteg/master
Browse files Browse the repository at this point in the history
Add class attr for nav tag
  • Loading branch information
KamilDzierbicki authored Dec 13, 2018
2 parents 4362f3e + ba2441f commit 9666181
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ Render Pagination with a theme

= paginate @users, theme: 'twitter-bootstrap-4'

Render with specific pagination classes
Render with specific pagination & nav classes

= paginate @users, theme: 'twitter-bootstrap-4',
pagination_class: "pagination-sm"
pagination_class: "pagination-sm",
nav_class: "d-inline-b"
= Credits

{Kaminari}[https://github.com/amatsuda/kaminari] - For making kaminari gem
Expand Down
3 changes: 2 additions & 1 deletion app/views/kaminari/twitter-bootstrap-4/_paginator.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
paginator: the paginator that renders the pagination tags inside
-%>
<%- pagination_class ||= '' %>
<%- nav_class ||= '' %>
<%= paginator.render do -%>
<nav>
<nav class="<%= nav_class %>">
<ul class="pagination <%= pagination_class %>">
<%= first_page_tag unless current_page.first? %>
<%= prev_page_tag unless current_page.first? %>
Expand Down

0 comments on commit 9666181

Please sign in to comment.