We are having an intermittent problem with has_and_belongs_to_many where the join table record is not created. For example, we have a HABT relationship mapped on both sides of models InFile and Sponsor. Our code looks like this:
sponsor = Sponsor.find(sponsor_id) in_file = InFile.new(attributes) in_file.sponsors << sponsor in_file.save
Occasionally the new join record in in_files_sponsors is not inserted. It takes a while for this to start happening, but once it starts happening it continues. We are using Rails 2.02 with Ruby 1.8.5.
Thanks!
Steve and Jonathan