HI folks,
I'm new at this - but google isn't helping me find what I'm doing wrong. Help appreciated!
I have a ship model, a ship has_one order
when editing the ship, I want to also change the order. I can't show the existing order in the form.
I have tested that <%= @ship.order.ypos %> displays the correct value in my form, so the data is making it's way down to the view.
I have tried variations around
<% form_tag :action => 'update', :id => @ship do %>
<p><label for="ship_name">Name</label><%= text_field 'ship', 'name' %></p>
<p><label for="ship_order_ypos">Ypos</label><%= text_field 'ship_order', 'ypos' %></p>
<%= submit_tag 'Update' %>
<% end %>
how am I meant to do this?
thanks in advance,
Rob