From 6e73a18f9c561c2562868c0eb791c2e099b4811f Mon Sep 17 00:00:00 2001 From: andrew Date: Thu, 4 Oct 2007 04:54:21 +0000 Subject: [PATCH] helper git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@10 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7 --- app/helpers/application_helper.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 952e033..cb3ce3e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -6,4 +6,11 @@ module ApplicationHelper return @page.title if @page "BarleySodas :: #{controller_class_name.gsub(/Controller/, '')}" end + + ## + # Returns a link for a Page model. + # + def link_to_page(page) + link_to page.title, page_path({ :id => page.title_for_url }) + end end