Skip to content

Commit

Permalink
extra parameter :pagination_class for bootstrap pagination-* extra cl…
Browse files Browse the repository at this point in the history
…asses
  • Loading branch information
Santi committed Mar 22, 2013
1 parent 8bcf678 commit 262756f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ Render Pagination with a theme

= paginate @posts, :theme => 'twitter-bootstrap'

Render with specific pagination classes

= paginate @posts, :theme => 'twitter-bootstrap',
:pagination_class => "pagination-small pagination-centered"

= Credits

{Kaminari}[https://github.com/amatsuda/kaminari] - For making an awesome gem
Expand Down
4 changes: 3 additions & 1 deletion app/views/kaminari/twitter-bootstrap/_paginator.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
remote: data-remote
paginator: the paginator that renders the pagination tags inside
-%>
<% pagination_class ||= "" %>
<%= paginator.render do -%>
<div class="pagination">
<div class="pagination <%= pagination_class %>">
<ul>
<%= first_page_tag unless current_page.first? %>
<%= prev_page_tag unless current_page.first? %>
Expand Down
2 changes: 1 addition & 1 deletion lib/bootstrap-kaminari-views/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module BootstrapKaminariViews
VERSION = "0.0.2"
VERSION = "0.1.0"
end

0 comments on commit 262756f

Please sign in to comment.