Module: BreadcrumbsOnRails::ActionController::HelperMethods

Defined in:
lib/breadcrumbs_on_rails/action_controller.rb

Instance Method Summary collapse

Instance Method Details

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



85
86
87
88
89
90
91
92
93
# File 'lib/breadcrumbs_on_rails/action_controller.rb', line 85

def render_breadcrumbs(options = {}, &block)
  builder = (options.delete(:builder) || Breadcrumbs::SimpleBuilder).new(self, breadcrumbs, options)
  content = builder.render.html_safe
  if block_given?
    capture(content, &block)
  else
    content
  end
end