Module: BreadcrumbTrail::ActionController::ClassMethods

Defined in:
lib/breadcrumb_trail/action_controller.rb

Overview

This extends a controller, providing the `breadcrumb` method to the class as a method.

Instance Method Summary collapse

Instance Method Details

This method returns an undefined value.

Creates a before action that defines a breadcrumb before the action takes place. See HelperMethods#breadcrumb.


24
25
26
27
28
# File 'lib/breadcrumb_trail/action_controller.rb', line 24

def breadcrumb(options, &block)
  before_action(options.delete(:action) || {}) do
    breadcrumb(options, &block)
  end
end