я изменил код в: app \ views \ editprofile \ edit.html.erb
<%= form_for :profileinfo do |fe| %>
<fieldset>
<info><%= @titlu %></info>
<%= error_messages_for 'profileinfo' %>
<div class="fields">
<%= text_field_for fe, "first_name" %>
<%= text_field_for fe, "last_name" %>
<label for="gender">Gender:</label>
<%= radio_button :profileinfo, :gender, "Male" %> Male
<%= radio_button :profileinfo, :gender, "Female" %> Female
<br />
<label for="birth_date">Birthdate:</label>
<%= date_select :profileinfo, :birth_date, :start_year => Profile::YEAR_FT, :end_year => Time.now.year, :include_blank => true, :order => [:month, :day, :year] %>
<%= text_field_for fe, "ocupation" %>
<%= text_field_for fe, "city" %>
<%= text_field_for fe, "country" %>
<%= text_field_for fe, "postal_code", Profile::PSTCOD_LEN %>
<%= submit_tag "Update", :class => "submit" %>
</div>
</fieldset>
<% end %>
также функция text_field_for в application_helper
def text_field_for(form, field, size=TEXT_FIELD_LEN, maxlength=STRING_LEN_MAX_DB)
label = content_tag("label", "#{field.humanize}:", :for => field)
form_field = form.text_field field, :size => size, :maxlength => maxlength
content_tag("div", "#{label} #{form_field}", :class => "fields")
end
пол и день рождения в порядке, но для текстовых полей я не получаю текстовые поля, вместо этого я получаю HTML-теги со всеми параметрами ... как это:
<label for="first_name">First name:</label> <input id="profileinfo_first_name" maxlength="255" name="profileinfo[first_name]" size="15" type="text" value="" />
<label for="last_name">Last name:</label> <input id="profileinfo_last_name" maxlength="255" name="profileinfo[last_name]" size="15" type="text" value="" />