Skip to content

Instantly share code, notes, and snippets.

@zechtz
Created May 27, 2015 14:30
Show Gist options
  • Save zechtz/f5e21594170bef7c3362 to your computer and use it in GitHub Desktop.
Save zechtz/f5e21594170bef7c3362 to your computer and use it in GitHub Desktop.
For Wiseone
<div id="product_list" >
<h1>Listing products</h1>
<table>
<% @products.each do |product| %>
<tr class="<%= cycle('list_line_odd' , 'list_line_even' ) %>" >
<td>
<%= image_tag(product.image_url, :class => 'list_image' ) %>
</td>
<td class="list_description" >
<dl>
<dt><%= product.title %></dt>
<dd><%= truncate(strip_tags(product.description),
:length => 80) %></dd>
</dl>
</td>
<td class="list_actions" >
<%= link_to 'Show' , product %><br/>
<%= link_to 'Edit' , edit_product_path(product) %><br/>
<%= link_to 'Destroy' , product,
:confirm => 'Are you sure?' ,
:method => :delete %>
</td>
</tr>
<% end %>
</table>
</div>
<%= link_to 'New product' , new_product_path %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment