Module: BreadcrumbHelper

Defined in:
app/helpers/breadcrumb_helper.rb

Instance Method Summary collapse

Instance Method Details

#p_breadcrumb(id, options = {}, &block) ⇒ Object



12
13
14
15
# File 'app/helpers/breadcrumb_helper.rb', line 12

def p_breadcrumb(id,options={},&block)    
   output = breadcrumb_encode_markup(id,options,&block)  
   output += breadcrumb_encode_script(id,options)              		                        
end

#p_breadcrumb_menu(id, options = {}) ⇒ Object



17
18
19
20
21
22
# File 'app/helpers/breadcrumb_helper.rb', line 17

def p_breadcrumb_menu(id,options={})
   options = options.stringify_keys       
   (:li, options) do
     (:a, options['value'], href: options['url'])
   end            		                        
end

#render_breadcrumbs(&block) ⇒ Object



3
4
5
6
7
8
9
10
# File 'app/helpers/breadcrumb_helper.rb', line 3

def render_breadcrumbs(&block)
  content = render :partial => 'prime-rails/breadcrumbs', :layout => false
  if block_given?
    capture(content, &block)
  else
    content
  end
end