From 0ad871e7480f1b43ea60512437ddcd65e081122a Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 3 Dec 2007 08:37:31 +0000 Subject: [PATCH] more ui simplification git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@48 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7 --- app/helpers/beers_helper.rb | 2 +- app/views/beers/index.rhtml | 4 +--- app/views/beers/show.rhtml | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/helpers/beers_helper.rb b/app/helpers/beers_helper.rb index 1b8047f..102abfa 100644 --- a/app/helpers/beers_helper.rb +++ b/app/helpers/beers_helper.rb @@ -4,7 +4,7 @@ module BeersHelper end def show_beer_link(beer) - link_to 'Show', beer_path(beer.page.title_for_url), + link_to beer.title, beer_path(beer.page.title_for_url), { :title => beer.title } end diff --git a/app/views/beers/index.rhtml b/app/views/beers/index.rhtml index 2df7ce2..d11eb80 100644 --- a/app/views/beers/index.rhtml +++ b/app/views/beers/index.rhtml @@ -1,8 +1,6 @@ diff --git a/app/views/beers/show.rhtml b/app/views/beers/show.rhtml index 0f55aed..ecd793d 100644 --- a/app/views/beers/show.rhtml +++ b/app/views/beers/show.rhtml @@ -3,4 +3,5 @@ <% content_for :sidebar do -%> <%= new_beer_link -%>
<%= edit_beer_link(@beer) -%>
+ <%= link_to 'Destroy', beer_path(@beer.page.title_for_url), :confirm => 'Are you sure?', :method => :delete %>
<% end -%>