Substruct

Hi,

i’m developing an cool store-app, based on the substruct store
developed by technowenie. ( i think ). cool store, but i’ve run into the
following problem:

Product - Image:

in substruct a product HABTM to images (and vice versa) but whenever
creating an image for a specific product (
@product.images.build(params[:product] ) all of the prior ones seem to
vanish \ are destroyed. The relashinship is of HABTM (and there is a
join_table called images_products) but for some reason it works like it
is a regular belongs_to relashinship.

i checked the models, and those only have has_and_belongs_to_many on
both models (image.rb, product.rb) .

why would the prior images of a product be deleted (also from the
public/image/…path as well as the corresponding record in the join
table images_products) if the relashinship is soley HABTM? (there’s no
dependent–> destroy, and even if there was, i aint destroyin nothin!
i’m creating a new image for an existing product…)

?

anyone run into this? have an idea why this should be happening?
many thanx.

s