I have a form_for written in the following manner:
<%= location.label :city %> <%= location.text_field :city, :disa 相关标签:
The trick is to use "object" in conjunction with a label for anything you don't want to change. Here is how you should code it:
<%= location.label(:country, f.object.country) %>
Make it readonly !
<%= location.text_field :country,:readonly => true%>