README.md in bootstrap-sass-extras-0.0.6 vs README.md in bootstrap-sass-extras-0.0.7

- old
+ new

@@ -3,10 +3,12 @@ [bootstrap-sass][1] extras, idea and codes from [twitter-bootstrap-rails][2] [1]: https://github.com/thomas-mcdonald/bootstrap-sass [2]: https://github.com/seyhunak/twitter-bootstrap-rails + [![Build Status](https://travis-ci.org/doabit/bootstrap-sass-extras.png?branch=master)](https://travis-ci.org/doabit/bootstrap-sass-extras) + ## Note From version 0.0.6, only support bootstrap 3. If you want to use bootstrap 2, please use version 0.0.5. ## Installation @@ -156,10 +158,16 @@ # <li class="active"> ... </li> # </ol> # </div> ``` +You can also optionally specify which custom view partial you would like to use for rendering the breadcrumbs: + +```erb +<%= render_breadcrumbs partial: 'path/to/custom/breadcrumbs' %> +``` + There are also a few interface methods available for working with the internal breadcrumbs hashes. The following methods are available in controllers and views. ```ruby # Given previously added breadcrumbs: @@ -174,9 +182,40 @@ ```ruby clear_breadcrumbs # => nil ``` + +### Nav Helper + +To render the Bootstrap example: + +```html +<ul class="nav nav-tabs"> + <li role="presentation" class="active"><a href="/">Home</a></li> + <li role="presentation"><a href="/profile">Profile</a></li> + <li role="presentation"><a href="/messages">Messages</a></li> +</ul> +``` + +In your views: + +```erb +<%= nav do %> + <%= nav_to('Home', root_path) %> + <%= nav_to(profile_path) do %> + Profile + <% end %> + <%= nav_to('Messages', controller: users, action: :messages) %> +<% end %> +``` + +The `tabs` helper declares that a tab component is being used. Alternatively, the `pills` helper can +be used in the same manner. Other classes can be specified in the `class` hash argument, the `nav` +class need not be specified. + +The `nav_to` helper accepts the same methods that the `link_to` helper accepts, but also +automatically applies the `active` class to the active link. ### Glyph Helper ```erb <%= glyph(:star) %>