I am very new to ruby on rails and am developing a catalogue application. I have set up my database and have added some entries. At the moment on my main page it is displaying all the data in my database but how do i go about just displaying one record for example. Here is my code:
<% if notice %>
<p id="notice"><%= notice %></p>
<% end %>
<h1>Bann.com - slightly smaller than Amazon!</h1>
<% @products.each do |product| %>
<div class="entry">
<table border="1">
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
<tr>
<td><%= image_tag(product.image_url) %></td>
<td><%= image_tag(product.image_url) %></td>
</tr>
<tr>
<td><h3><%= product.title %></h3>
<div class="price_line">
<span class="price"><%= number_to_currency product.price, :unit=>'£' %></span>
</div>
</div></td>
<td>row 2, cell 2</td>
</tr>
</table>
<% end %>
</div>in the second row of your table.