You have to use the fields_for tag for this, in the following code I
have two models. One for account and the other is for BillingProfile.
This code uses Rails 1.2.2.
<%= error_messages_for :account %>
<% form_for :account, @a, :url => account_path(@account), :html =>
{ :method => :put } do |f| %>
Account Information
Package:
<%= f.select :package, Account::PACKAGE_TYPES, :prompt => "Select
a package" %>
Upgrade Database:
<%= f.select :db_limit, Account::DATABASE_LIMITS, :prompt =>
"Select database limit" %>
Billing Information
<% fields_for :billing_profiles do |billing_profile| %>
Name
<%= billing_profile.text_field :name %>
Email
<%= billing_profile.text_field :email %>
Business phone
<%= billing_profile.text_field :business_phone %>
Home phone
<%= billing_profile.text_field :home_phone %>
Company
<%= billing_profile.text_field :company %>
Address1
<%= billing_profile.text_field :address1 %>
Address2
<%= billing_profile.text_field :address2 %>
City
<%= billing_profile.text_field :city %>
State
<%= billing_profile.text_field :state %>
Zip
<%= billing_profile.text_field :zip %>
Country
<%= billing_profile.country_select :country, ["United States"] %>
<% end %>
<%= submit_tag "Upgrade My Account" %>
<% end %>
On Mar 8, 8:33 pm, Tanzanite T. <rails-mailing-l…@andreas-