HABTM relationship

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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs