I would have an orderaddress object that you can split to shipping and
billing address that belongs to your order model, like this:

  belongs_to :billing_address, :class_name => 'OrderAddress',
      :foreign_key => 'billing_address_id',
      :dependent => :destroy
  belongs_to :shipping_address, :class_name => 'OrderAddress',
      :foreign_key => 'shipping_address_id',
      :dependent => :destroy

Validate and save this information before going to the cc page. And
most likely you do not want to save the creditcard info anyways so it
will be virtual attributes that you validate within the order model.

Thats some information that might help... I'm kinda in the middle of
spliting my own page so the next step someone else can answer :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to