Module: Amalgam::PagesHelper
- Defined in:
- app/helpers/amalgam/pages_helper.rb
Instance Method Summary collapse
Instance Method Details
#link_to_page(page, options = {}, &block) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'app/helpers/amalgam/pages_helper.rb', line 3 def link_to_page(page,={},&block) title = .delete(:title) || page.title url = .delete(:url) || page_path(page.slug) condition = .delete(:if) if condition.nil? link_to(title,url,,&block) else link_to_if(condition,title,url,,&block) end end |