Ok. Thank you for the help! Just one clarifying question, if I may:

Are you saying that "hobo_new" creates a new instance of the main
model and assigns it to @model-class-name (e.g. in your example,
@person), or did you mean that it creates it and assigns it to @this
which would mean your example should read:

def new
  hobo_new # this sets up a new Person or grabs the info from the
form
  @this.home.build if @this.home.blank? # make a new address for home
association if there isn't one
  @this.work.build if @this.work.blank? # similarly
end

Just trying to understand hobo-isms.

Thanks again!

Peter

On Feb 2, 2:50 pm, kevinpfromnm <[email protected]> wrote:
> No, your new would be something like:
>
> def new
>   hobo_new # this sets up a new Person or grabs the info from the form
>   @person.home.build if @person.home.blank? # make a new address for home
> association if there isn't one
>   @person.work.build if @person.work.blank? # similarly
> end
>
> You'll also need to add :accessible => true on the home and work
> associations in the person model.
>
> You might be able to get by with the default form after you set that option
> though I'm not 100% sure with belongs_to associations.

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to