On Dec 21, 4:17 am, Jamie Hodge <[email protected]> wrote:
> I'm interested in pushing inserts and updates of many_to_many
> associations into models. I have the following code at the moment. Is
> there a better approach to this? I am using a multiple select in the
> HTML form.

Your approach doesn't look bad, but you could try using the
nested_attributes plugin.

Also, note that the add_* association methods can take primary key
values directly, so you don't need to do the model lookup yourself.

Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" 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/sequel-talk?hl=en.

Reply via email to