Module: Railsstrap::BreadcrumbsHelper

Defined in:
app/helpers/railsstrap/breadcrumbs_helper.rb

Instance Method Summary collapse

Instance Method Details

#render_breadcrumbs(divider = '/', options = {}, &block) ⇒ Object

TODO: make divider optional



4
5
6
7
8
9
10
11
12
13
# File 'app/helpers/railsstrap/breadcrumbs_helper.rb', line 4

def render_breadcrumbs(divider = '/', options={}, &block)
  default_options = { :class => '', :item_class => '', :divider_class => '', :active_class => 'active' }.merge(options)
  #TODO: is default_options merged in and then unused?
  content = render :partial => 'railsstrap/breadcrumbs', :layout => false, :locals => { :divider => divider, options: options }
  if block_given?
    capture(content, &block)
  else
    content
  end
end