Skip to content

Instantly share code, notes, and snippets.

@DVG
Created December 4, 2012 21:15
Show Gist options
  • Save DVG/4208766 to your computer and use it in GitHub Desktop.
Save DVG/4208766 to your computer and use it in GitHub Desktop.
class Post
has_one :avatar
end
class Avatar
belongs_to :post
has_one :image
delegate :image, :to => :post
end
class Image
belongs_to :avatar
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment