Teamtreehouse - Advanced Social Features in Ruby on Rails
MP4 | Video: AVC at 101 Kbps, 1280 x 720 (1.778) at 30 fps | Language: English
Audio: AAC at 56.7 Kbps, 2 channels, 44.1 KHz | Also included: Project Files | 448 MB
Genre: Development / Programming
In our previous Ruby on Rails projects, we created a simple social network called Treebook. So far we can create statuses and have friends. Now we’re ready to implement the fun stuff! In this project, we’ll be adding file uploads, image galleries, and activity feeds to our application. We’ll also be implementing push updates via polling.
In this stage we're going to add file uploads to our statuses. We'll use the paperclip gem to add the necessary fields to the database and help with uploading files.
Uploading and Resizing Images
We already know that we can upload files and attach them to statuses. Wouldn't it be cool to give our users avatars on the site? But what do we do if someone uploads an image that is really big? What we want to do is resize it so that it doesn’t take up as much space on our server as well as have it be formatted to look good on our site.
Create an Image Gallery
Now that we have file uploads working, we can implement an image gallery and albums to our social networking application. We’ll use some of the concepts from the previous stage as well as our knowledge of associations to create image galleries.
Our members can now upload files and create image galleries. Wouldn’t it be great if we had a place to display everything? In this stage we’re going to add an activity feed that will let us know what all our friends are up to.