Module: BreadnButter::Helpers
- Defined in:
- lib/breadnbutter/helpers.rb
Instance Method Summary collapse
-
#get_breadcrumbs ⇒ Object
Include this module in any controller you want to use breadcrumbs.
- #render_breadcrumbs ⇒ Object
Instance Method Details
#get_breadcrumbs ⇒ Object
Include this module in any controller you want to use breadcrumbs
3 4 5 6 7 8 9 |
# File 'lib/breadnbutter/helpers.rb', line 3 def # note controller.request.env instead of controller.env # so that it works in both development, staging, # and in our controller specs which render views url = controller.request.env['PATH_INFO'] BreadnButter::Crumb.generate_crumbs_from_url(url) end |
#render_breadcrumbs ⇒ Object
11 12 13 |
# File 'lib/breadnbutter/helpers.rb', line 11 def render :partial => 'breadnbutter/crumb', :locals => {:breadcrumbs => } end |