README.md in binco-0.0.2 vs README.md in binco-0.0.3

- old
+ new

@@ -3,10 +3,11 @@ This is a wrapper for adding bootstrap to a project. By includinig this gem you'll add: * [Bootstrap](https://github.com/twbs/bootstrap-sass) * [Bootstrap Datepicker](https://github.com/Nerian/bootstrap-datepicker-rails) * [Select2](https://github.com/argerim/select2-rails) +* [Will paginate](https://github.com/mislav/will_paginate) * Bootstrap Helpers ## Installation @@ -18,11 +19,16 @@ and run: ``` bundle install ``` +### Automatic +Run `rails g binco:install` +This creates the `application.scss` with binco (and bootstrap) included, your `_bootstrap-overrides.scss` file and insert assets into javascript manifest. + +### Manual Installation In your application.scss add: ``` @include "binco" ``` @@ -39,11 +45,10 @@ ``` ## Usage - ```erb <%= bootstrap_form_for(@object) do |f| %> <%= f.form_group do %> <%= f.label :product_id %> <%= f.collection_select :product_id, @products, :id, :name, class: 'special-select-class-if-needed' %> @@ -102,8 +107,19 @@ binco.breadcrumb_before = { title: 'You are here' } binco.breadcrumb_default = [ { title: 'Index', url: '/' } ] end +``` + +### Pagination +```ruby +# controller +@posts = Post.all.page(params[:page]) +``` + +```erb +<!-- View --> +<%= render 'binco/pagination', collection: @posts %> ``` This project rocks and uses MIT-LICENSE.