Skip to content

Instantly share code, notes, and snippets.

View CJNE's full-sized avatar

Johan Isacsson CJNE

View GitHub Profile
class Picture < ActiveRecord::Base
has_many :imagables_pictures
has_many :imagables, :through => :imagables_pictures
end
class ImagablesPicture < ActiveRecord::Base
belongs_to :picture
belongs_to :imageable, :polymorphic => true
end