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 %>
Name<%= text_field 'ship', 'name' %>
Ypos<%= text_field 'ship_order', 'ypos' %>
<%= submit_tag ‘Update’ %>
<% end %>
how am I meant to do this?
thanks in advance,