Forum: Ruby on Rails advice on has_one edition

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Xavier N. (Guest)
on 2007-02-26 14:00
(Received via mailing list)
In my model a user has one address.

The form for creation/edition of users shows plain fields for their
address fields, the user does not see the split in the interface. A
way to write that is

   <% @address = @user.address %>
   ... form helpers for @address ...

   in the controller you take params[:user]
   and params[:address] and construct the
   stuff by hand

Is there a more idiomatic approach?

-- fxn
This topic is locked and can not be replied to.