The most "correct" way to model this in the database is to have a pair of foreign keys in your locations
table, pointing to the clips
table. To achieve this, you can invert the association, and add a listing_clip_id
and a description_clip_id
to your location
table.
Then, modify your associations:
class Location < ActiveRecord::Base
belongs_to :listing_clip, class_name: 'Clip'
belongs_to :description_clip, class_name: 'Clip'
end
class Clip < ActiveRecord::Base
has_one :listed_location, class_name: 'Location', foreign_key: 'listing_clip_id'
has_one :described_location, class_name: 'Location', foreign_key: 'description_clip_id'
end