Skip to content

Instantly share code, notes, and snippets.

@riyad
riyad / bootstrap_breadcrumbs_builder.rb
Created February 28, 2012 17:38
How to make breadcrumbs_on_rails render a Bootstrap compatible breadcrumb navigation
# The BootstrapBreadcrumbsBuilder is a Bootstrap compatible breadcrumb builder.
# It provides basic functionalities to render a breadcrumb navigation according to Bootstrap's conventions.
#
# BootstrapBreadcrumbsBuilder accepts a limited set of options:
# * separator: what should be displayed as a separator between elements
#
# You can use it with the :builder option on render_breadcrumbs:
# <%= render_breadcrumbs :builder => ::BootstrapBreadcrumbsBuilder, :separator => "&raquo;" %>
#
# Note: You may need to adjust the autoload_paths in your config/application.rb file for rails to load this class:
@riyad
riyad / Gemfile
Created February 23, 2011 10:56
How to setup your Rails app for using the declarative_authorization gem
source 'http://rubygems.org'
gem 'rails', '3.0.3'
...
gem 'declarative_authorization'
group :development do
# for the graphical overview over your rules
# available at /authorization_rules