adding optional title to show page link helper

git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@40 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7
master
andrew 2007-11-17 09:41:50 +00:00
parent 748c030670
commit 55fc5cc72d
1 changed files with 2 additions and 2 deletions

View File

@ -3,8 +3,8 @@ module PagesHelper
link_to 'New Page', new_page_path, { :title => 'Create a new page' }
end
def show_page_link(page)
link_to 'Show', page_path(page.title_for_url),
def show_page_link(page, better_title = 'Show')
link_to better_title, page_path(page.title_for_url),
{ :title => page.title }
end