So, here we are, I am almost at the end of the Flatiron curriculum and I can’t believe it. This program has taken me longer than it should’ve because life got in the way more times than I would like. But, I made it! “Nevertheless she persisted” has been my motto this past year, and this year. I keep on going no matter what life throws at me.
For this project we had to add on to our Rails app and make it have JS functionality. Seems simple right? Well, I couldn’t be more wrong. First off, I’ve found JS very tough coming from learning Ruby. It has been hard for me to switch into JS and not think about code the way you would with Rails.
But with a lot of hard work, sweat and tears (lots of tears) I actually got it up and running. I don’t want to take full credit because I had some great people to bounce my ideas off of and they could point me to the right direction if I wasn’t on the right track.
My rails app is a place for people like myself, tv addicts. We can unite and share our reviews of shows that we have watched. It is like a very basic IMDB website but only for TV. So to add in the jQuery I did the following:
1 — When you go to your profile page you click on “All Shows” and then without a page refresh every show in the database appears
2 — Underneath the show name there are two buttons “more info”. If you click more info, again no page refresh, but you see the name of the show and the genre.
3 & 5 — When you click the button “reviews” it will show you every review for the specific show. If the show doesn’t have any reviews, a message appears saying “no reviews”. (the Active Model relationship is: shows has many reviews through users) I called from the class method of Reviews to get them.
4 — The user can click on “new review” button and the form will appear, the user can add in their review and it will be immediately shown without a page refresh.
I found this project very hard to understand because the way we were taught JS was not as clear to me as Ruby. I hopefully met all the requirements!
Originally published at amandarebeccacodes.org.