I’m new to rails.
I have created a bunch of CRUD code using scaffolds.
I had to add code to the default output to account for
fields that establish the relationships between tables.
Everything works well, including the validation of the
fields I added. However, I can’t get the highlighting
to work for my fields when they fail validation and the
view is redisplayed.
Here is an example snippet from _form.rhtml:
<%= text_field 'account', 'number' %>
Choose <% for broker in @brokers %> <%=broker.name%> <% end %>
I think if I used the select helper it would work, but I
can’t think of a way to inject my “fake” row of “0, Choose”
as a Broker that forces the user to pick a value from the
dropdown (he legit values are all in the @brokers list).