I know this is an old question, but since you didn't get any replies, I thought I would chime in.
In your slides example, it's clear that a
Slide can be associated with more than one
Image can be associated with more than
Slide. As a result, you need a many-to-many relationship.
In Rails, many-to-many relationships are often implemented as a "has_many through" relationship, which links one record to another via an intermediate record.
As an example, you could have a
SlideImageAssignment model, which connects a given
Slide to a given
class SlideImageAssignment < ActiveRecord::Base
class Slide < ActiveRecord::Base
has_many :images, through: :slide_image_assignments
For each image you want to associate with a slide, you create a separate