This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
barleysodas/app/views/breweries/index.rhtml

26 lines
700 B
Plaintext
Raw Normal View History

<% unless @breweries.empty? -%>
<table>
<tr>
<th>Title</th>
<th></th>
<th></th>
<th></th>
</tr>
<% for brewery in @breweries %>
<tr>
<td><%= brewery.title -%></td>
<td><%= link_to 'Show', brewery_path(brewery.page.title_for_url) %></td>
<td><%= link_to 'Edit', edit_brewery_path(brewery.page.title_for_url) %></td>
<td><%= link_to 'Destroy', brewery_path(brewery.page.title_for_url), :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<% else -%>
<p>No breweries, yet.</p>
<% end -%>
<% content_for :sidebar do -%>
<%= link_to 'New brewery', new_brewery_path -%><br />
<%= render :partial => 'shared/tag_cloud' %>
<% end -%>