Finished Ruby on Rails, but still confused on some things, help?


So I went through the whole course, and for the most part I understand it, and with some more practice, I will get better. Something that bothered me was I didn't know where the content of the websites I made through the course came from. There was a lot of images and content, like movie names, actor names, bio's of the actors and plots of the movies etc and I couldn't find where they were coming from. Does anyone know? did they come from some server somewhere or what? I'm confused.


Hey Stephen,

The movie names, actor names, etc., are just text, which are being stored right there in our Rails app. The only thing being stored elsewhere is the images, Which come from a URL like:[section number]/[project name]/[image].jpg

(unfortunately, not using HTTPS even though AWS lets them).
If you look in the seeds.rb file, you'll see a bunch of stuff, for example:

a1 = Album.create(cover: "", title: "My Beautiful Dark Twisted Fantasy", artist: "Kanye West")
Track.create(name: "Dark Fantasy", minutes: 5, album_id:
# more tracks

a2 = Album.create(cover: "", title: "Beyonce", artist: "Beyonce")
Track.create(name: "Pretty Hurts", minutes: 5, album_id:
# more tracks

So you can see how when they seed the database, they're linking to an external resource for the cover image.
I wish they would've had us do some file uploads, though. That would've been fun :)