Is there any documentation or a small pointer where to look about
multi-model forms?

On 'normal' rails I use the pattern ryan bates explained in
railscasts, he also put this in 'advanced rails recipes'.

I need to create a model (user),  but with it, some other models
(ratings on topics he might be interrested in).
rating model sits between topic and user, only attribute is value

on user model:

def ratings_for_all_topics
  topics.map do |topic|
    ratings.find_or_initialize_by_topic_id(topic.id)
  end
end

this gives me an array of rating objects for a user.
this works for new(unexistent) users as well as existing users.

the idea is to put those on the user form (using fields for).
The user model then handlles those 'rating_attributes[]' by creating/
updating/deleting them.

I guess I can do this the same way with hobo, just not sure on how to
use dryml for this, since I need some kind of form-cards for those
rating objects.

Any pointers?

Thanks,
Mathijs
--~--~---------~--~----~------------~-------~--~----~
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