From 309b0e7374328ab1ba47a5115ae9fc8d1ab1d544 Mon Sep 17 00:00:00 2001 From: Coleman Date: Sat, 11 Oct 2008 17:35:00 -0500 Subject: [PATCH] add relationship --- app/models/photo.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/photo.rb b/app/models/photo.rb index 76b9dff..4ab83bd 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -4,6 +4,7 @@ class Photo < ActiveRecord::Base attr_protected :email_hash has_many :votes, :dependent => :destroy + has_many :photo_favorites, :dependent => :destroy before_create :validate_image_sanity before_create :hashify_email