Module: Outpost::Breadcrumbs

Extended by:
ActiveSupport::Concern
Included in:
ApplicationController
Defined in:
lib/outpost/breadcrumbs.rb

Overview


Instance Method Summary collapse

Instance Method Details


Use this method to add breadcrumbs. See Outpost::Breadcrumbs for usage.



63
64
65
66
67
68
69
70
71
72
73
# File 'lib/outpost/breadcrumbs.rb', line 63

def breadcrumb(*args)
  @breadcrumbs ||= []

  args.each_slice(2).map do |pair|
    crumb       = Outpost::Breadcrumb.new
    crumb.title = pair[0]
    crumb.link  = pair[1]

    @breadcrumbs.push crumb
  end
end