MY RAILS APP

Project number three is just about in the books, just waiting to do my review. This was the easiest of the first 3 projects so far and I definitely credit that to a new level of understanding. Everything is slowly starting to click so hopefully that will continue as I venture forward into JavaScript and React.
I decided to do a movie rental service for my Rails MVC. It allows a user to sign up and login, edit their profile page, view and rent from a list of movies, and return those movies once they are done with them. I started by generating my rails app and then using various generators I built out all of my databases, controllers, models, and views. My project contained a Movies, Users, Rentals, and Sessions controller, and Models for all of the above except sessions. I did Omniauth authentication through Facebook and it still baffles me how easy that is to implement into an application.
The most challenging aspect of the project was definitely figuring out how to make the rentals transaction work. My original plan was to use a currency system. The user would be created with a money parameter and would be able to edit it at any time to add more funds to their account. But eventually after much headache I decided to forgo that idea and just allowed the rental transaction to occur with a monetary system. The logic behind renting a movie assigning it to a individual and then allowing that individual to return the movie was more frustrating than I originally thought it would be. After a lot of scouring the internet I eventually figured it out and decided to add a age restriction to it. so that anyone under the age of 17 wouldn’t be able to rent movies with a rating of R, and anyone under the age of 13 wouldn’t be able to rent anything with a rating above PG. Aside from the rental aspect the rest of the project with very smoothly. Creating the structure for a rails app is something I feel immensely comfortable with now, and aside from a little hiccup with creating nested resources I feel very confident in my ability to create Rails applications on a consistent basis.
As much of a headache as learning programming has been, the sense of accomplishment I get when I figure something out or find the errors that’s been plaguing my code is unrivaled. I love the creation aspect of this field, and I can’t wait to dive into the next section.

Leave a comment

Design a site like this with WordPress.com
Get started