Module: Tenon::BreadcrumbsHelper

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

Instance Method Summary collapse

Instance Method Details



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

def breadcrumb_links
  links = []
  if controller_name != 'index'
    path = polymorphic_path(controller_name)
    links << make_link(controller_name.titleize, path)

    if %w( new edit ).include?(action_name)
      links << make_link(member_title, member_path)
    end
  end
  links
end