Hello, I'm looking for suggestions on creating a model/scaffold for Photos
I want a user to be able to create a album that contains 1 or more photos.
Current idea:
album
id, name, user_id
photos
id, name, album_id
Thoughts?
Thanks
Hello, I'm looking for suggestions on creating a model/scaffold for Photos
I want a user to be able to create a album that contains 1 or more photos.
Current idea:
album
id, name, user_id
photos
id, name, album_id
Thoughts?
Thanks
The above works fine if you want to constrain each photo to only one album. If a photo can belong to multiple albums you'll have to look into the has_many :through relationship.