hotfix for photos/collection relationship to fix photo saving

This commit is contained in:
danielvincent 2010-07-20 19:29:19 -07:00
parent 51fd87db36
commit 249948a500
2 changed files with 1 additions and 5 deletions

View file

@ -4,7 +4,7 @@ class Collection
key :name, String
belongs_to :person, :class_name => 'Person'
many :photos, :class_name => 'Photo', :foreign_key => :collection_id
#many :photos, :class_name => 'Photo', :foreign_key => :collection_id
validates_presence_of :name

View file

@ -2,8 +2,4 @@ class Photo < Post
require 'carrierwave/orm/mongomapper'
include MongoMapper::Document
mount_uploader :image, ImageUploader
key :collection_id, ObjectId
belongs_to :collection, :class_name => 'Collection'
end