hotfix for photos/collection relationship to fix photo saving
This commit is contained in:
parent
51fd87db36
commit
249948a500
2 changed files with 1 additions and 5 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue