README.md in bootstrap-sass-extras-0.0.2 vs README.md in bootstrap-sass-extras-0.0.3

- old
+ new

@@ -74,9 +74,58 @@ ## Using Helpers ### Flash helper Add flash helper `<%= bootstrap_flash %>` to your layout (built-in with layout generator) +### Modal Helper +You can create modals easily using the following example. The header, body, and footer all accept content_tag or plain html. +The href of the button to launch the modal must matche the id of the modal dialog. + +```ruby +<%= content_tag :a, "Modal", :href => "#modal", :class => 'btn', :data => {:toggle => modal'} %> + +<%= modal_dialog :id => "modal", + :header => { :show_close => true, :dismiss => 'modal', :title => 'Modal header' }, + :body => 'This is the body', + :footer => content_tag(:button, 'Save', :class => 'btn') %> +``` + +### Breadcrumbs Helpers + +*Notice* If your application is using [breadcrumbs-on-rails](https://github.com/weppos/breadcrumbs_on_rails) you will have a namespace collision with the add_breadcrumb method. +You do not need to use these breadcrumb gems since this gem provides the same functionality out of the box without the additional dependency. + +Add breadcrumbs helper `<%= render_breadcrumbs %>` to your layout. + +```ruby +class ApplicationController + add_breadcrumb :index, :root_path +end +``` + +```ruby +class ExamplesController < ApplicationController + add_breadcrumb :index, :examples_path + + def index + end + + def show + @example = Example.find params[:id] + add_breadcrumb @example.name, example_path(@example) + # add_breadcrumb :show, example_path(@example) + end +end +``` + +### Glyp Helper + +```ruby +glyph(:share_alt) +# => <i class="icon-share-alt"></i> +glyph(:lock, :white) +# => <i class="icon-lock icon-white"></i> +``` ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`)