Module: BreadcrumbsOnRails::ActionController::ClassMethods

Defined in:
lib/breadcrumbs_on_rails/action_controller.rb

Instance Method Summary collapse

Instance Method Details

#add_breadcrumb_on_rails(name, path = nil, filter_options = {}) ⇒ Object Also known as: add_breadcrumb



49
50
51
52
53
54
55
# File 'lib/breadcrumbs_on_rails/action_controller.rb', line 49

def add_breadcrumb_on_rails(name, path = nil, filter_options = {})
  element_options = filter_options.delete(:options) || {}

  before_action(filter_options) do |controller|
    controller.send(:add_breadcrumb, name, path, element_options)
  end
end