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