N
Nick
hey, i am new to ruby, and i want to try this out
just showing all the products from the database with there image
this is the code:
<html>
<head>
<title>All Recipes</title>
</head>
<body>
<h1>Catalogus</h1>
<table cellspacing="0" border="0">
<% @products.each do |product| %>
<tr class="productnaam">
<td width="450px" class=""><%= link_to product.name, :action => "show",
:id => product.id %></td>
<td align="right"><%= link_to "<img src='details.gif' />", :action =>
"show", :id => product.id %></td>
</tr>
<tr>
<td><b>Prijs/stuk:</b> ? <%= product.price %></td>
<td align="right">
<img src="<%= product.image %>" alt="<%= product.name %>"
class="catalogus"/>
</td>
</tr>
<% end %>
</table>
<p><%= link_to "Create new recipe", :action => "new" %></p>
<img src="details.gif"/>
</body>
</html>
i cant get the image to show, how must u do that, even an regular image, and
where do i need to put the files????
thanks in advance
just showing all the products from the database with there image
this is the code:
<html>
<head>
<title>All Recipes</title>
</head>
<body>
<h1>Catalogus</h1>
<table cellspacing="0" border="0">
<% @products.each do |product| %>
<tr class="productnaam">
<td width="450px" class=""><%= link_to product.name, :action => "show",
:id => product.id %></td>
<td align="right"><%= link_to "<img src='details.gif' />", :action =>
"show", :id => product.id %></td>
</tr>
<tr>
<td><b>Prijs/stuk:</b> ? <%= product.price %></td>
<td align="right">
<img src="<%= product.image %>" alt="<%= product.name %>"
class="catalogus"/>
</td>
</tr>
<% end %>
</table>
<p><%= link_to "Create new recipe", :action => "new" %></p>
<img src="details.gif"/>
</body>
</html>
i cant get the image to show, how must u do that, even an regular image, and
where do i need to put the files????
thanks in advance