Module: ApplicationHelper

Includes:
ScaffoldLogic::FormHelper, ScaffoldLogic::Helper
Defined in:
app/helpers/application_helper.rb

Instance Method Summary collapse

Instance Method Details



5
6
7
8
9
10
11
12
# File 'app/helpers/application_helper.rb', line 5

def breadcrumbs
  html = [ link_to('Home', root_path) ]
  html << link_to( 'Locations', locations_path ) if controller?('locations')
  html << link_to( 'Search', directory_search_root_path ) if controller?('directory') && action?('search')
  html << link_to( 'Services', services_path ) if controller?('services')
  html << @locale.non_root_ancestors_and_self.map{ |l| link_to l.name, l.to_param } if @locale && ! @locale.country?
  (html * ' &gt; ').html_safe
end

#set_title(title = nil) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'app/helpers/application_helper.rb', line 14

def set_title(title = nil)
  if title.nil?
    content_for(:title) { APPLICATION_NAME }
    content_for(:page_title) {  }
  else
    content_for(:title) { title + " - #{APPLICATION_NAME}" }
    content_for(:page_title) { title }
  end
end