Skip to content

Instantly share code, notes, and snippets.

@phillipoertel
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save phillipoertel/73291376a5152749aac4 to your computer and use it in GitHub Desktop.
Save phillipoertel/73291376a5152749aac4 to your computer and use it in GitHub Desktop.
class PortfolioItem::Image < ActiveEceord::Base
end
class PortfolioItem < ActiveEceord::Base
has_many :images, class_name: 'PortfolioItem::Image', dependent: :destroy
# id stored in column portfolio_items.tile_image_id
has_one :tile_image, class_name: 'PortfolioItem::Image', dependent: :destroy
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment