Forum: Ruby on Rails HABTM relationship

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Andy Wiens (Guest)
on 2006-03-23 22:33
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

class Condition < ActiveRecord::Base
  has_and_belongs_to_many :cses

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?
This topic is locked and can not be replied to.