HABTM relationship


#1

Hi all,

I’ve got the following two objects and the habtm relationship isn’t
putting records in the DB:

class Cse < ActiveRecord::Base
has_and_belongs_to_many :conditions
end

class Condition < ActiveRecord::Base
has_and_belongs_to_many :cses
end

I’m creating a Cse object and filling the collection of Conditions, then
calling save on the Cse object. Nothing is getting saved in the
conditions_cses table. Is there anyway to do fill the collection of
conditions prior to saving the cse object?