diff --git a/app/helpers/breweries_helper.rb b/app/helpers/breweries_helper.rb index 34a9fdd..2e591a5 100644 --- a/app/helpers/breweries_helper.rb +++ b/app/helpers/breweries_helper.rb @@ -5,7 +5,7 @@ module BreweriesHelper end def show_brewery_link(brewery) - link_to 'Show', brewery_path(brewery.page.title_for_url), + link_to brewery.title, brewery_path(brewery.page.title_for_url), { :title => brewery.title } end diff --git a/app/views/breweries/index.rhtml b/app/views/breweries/index.rhtml index edffbae..424c9e5 100644 --- a/app/views/breweries/index.rhtml +++ b/app/views/breweries/index.rhtml @@ -1,23 +1,12 @@ + + +<%= render :partial => 'shared/pagination_links' %> <% content_for :sidebar do -%> <%= link_to 'New brewery', new_brewery_path -%>
diff --git a/app/views/breweries/show.rhtml b/app/views/breweries/show.rhtml index 974146a..872515a 100644 --- a/app/views/breweries/show.rhtml +++ b/app/views/breweries/show.rhtml @@ -1,6 +1,7 @@ <%= render :partial => 'pages/page' %> <% content_for :sidebar do -%> - <%= link_to 'New Brewery', new_brewery_path -%>
- <%= link_to 'Edit', edit_brewery_path(@brewery.page.title_for_url) -%>
+ <%= new_brewery_link -%>
+ <%= edit_brewery_link(@brewery) -%>
+ <%= link_to 'Destroy', brewery_path(@brewery.page.title_for_url), :confirm => 'Are you sure?', :method => :delete %>
<% end -%>