Module: ApplicationHelper
- Includes:
- MenuHelper
- Defined in:
- app/helpers/application_helper.rb
Overview
Methods added to this helper will be available to all templates in the application.
Instance Method Summary collapse
- #block_content_by_key(single_key) ⇒ Object
- #meta_info(page, meta) ⇒ Object
- #page_by_key(single_key) ⇒ Object
- #page_category_path(object) ⇒ Object
- #render_block(id) ⇒ Object
Methods included from MenuHelper
Instance Method Details
#block_content_by_key(single_key) ⇒ Object
22 23 24 25 |
# File 'app/helpers/application_helper.rb', line 22 def block_content_by_key(single_key) block = Block.find_by_single_key(single_key) block.content if block end |
#meta_info(page, meta) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/helpers/application_helper.rb', line 4 def (page, ) if page && page. case when :title return page..title when :keywords return page..keywords when :description return page..description end end end |
#page_by_key(single_key) ⇒ Object
17 18 19 20 |
# File 'app/helpers/application_helper.rb', line 17 def page_by_key(single_key) page = Page.find_by_single_key(single_key) return page ? page : @page end |
#page_category_path(object) ⇒ Object
27 28 29 |
# File 'app/helpers/application_helper.rb', line 27 def page_category_path(object) super(:id => nil, :category_name => object.name) end |