just remove @ from time_delta
<% @stock.time_deltas.each do |time_delta| %>
<tr>
<td><%= time_delta.start %></td>
<td><%= time_delta.length %></td>
</tr>
<% end %>
up
You need @ only to be able to share this var with your view. Eg: If you add this to your show action: @time_deltas = TimeDelta.all
you can show time_deltas in your view.
like:
<% @time_deltas.each do |td|%>
<%= td.start%>
<% end %>