Forum: Ruby on Rails help

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Patrick L. (Guest)
on 2006-01-07 08:14
(Received via mailing list)
I am at a lost with error below:

Extracted source (around line #15):

12:    <p><b>Category:</b><br>
13:
14:   <select name="product[category_id]">
15:    <% @categories.each do |category| %>
16:        <option value="<%= category.id %>"
17:          <%= 'selected' if category.id == @product.category_id %>>
18:          <%= category.name %>
Edward O. (Guest)
on 2006-01-07 08:17
Patrick L. wrote:
> I am at a lost with error below:
>
> Extracted source (around line #15):
>
> 12:    <p><b>Category:</b><br>
> 13:
> 14:   <select name="product[category_id]">
> 15:    <% @categories.each do |category| %>
> 16:        <option value="<%= category.id %>"
> 17:          <%= 'selected' if category.id == @product.category_id %>>
> 18:          <%= category.name %>

A <% end > does close the do block at some point, right?
Mischa K. (Guest)
on 2006-01-07 11:50
(Received via mailing list)
Could be wrong but this looks like clientside code and there should
probably be some dynamics in there.

<select name="product[category_id]">

  ----- Original Message -----
  From: Patrick L.
  To: removed_email_address@domain.invalid
  Sent: Saturday, January 07, 2006 7:14 AM
  Subject: [Rails] help


  I am at a lost with error below:


  Extracted source (around line #15):

12:    <p><b>Category:</b><br>
13:
14:   <select name="product[category_id]">
15:    <% @categories.each do |category| %>
16:        <option value="<%= category.id %>"
17:          <%= 'selected' if category.id == @product.category_id %>>
18:          <%= category.name %>




------------------------------------------------------------------------------


  _______________________________________________
  Rails mailing list
  removed_email_address@domain.invalid
  http://lists.rubyonrails.org/mailman/listinfo/rails
This topic is locked and can not be replied to.