Saving habtm relationships and Rails 1.0


I know there’s a problem saving has_and_belongs_to_many relationships w/
Rails 1.0 in that only the first association is saved

What are people doing about this? I guess I could move to using the
trunk release, but I’m hesitant because that might introduce a bunch of

Is there a workaround? For example, a way to explicitly saves




I’ve been saving the associated object whenever I add something. This
is terribly inefficient, but I haven’t found a consensus on the
“right” way to do it.

Set up the staff object, and then…

default_entitlements = %w(this that the_other_thing)
default_entitlements.each { |e|
staff.entitlements << Entitlement.find_by_code(e)

Not great, but it works.