Sinatra App.

Posted by FionaDL on September 17, 2018

I really enjoyed working on the Sinatra Project because I finally felt like I was beginning to understand how everything connects. The big picture. It took me a very long time to complete this project due to family obligations and general life interruptions and also a complete computer meltdown which lead to a new computer (exciting, but frustrating). I worried that when I came back to the project after all the different interruptions I would be lost. However, at least some of the information seems to be sticking and I really enjoyed the overall process of creating this app!

My Sinatra app is a restaurant diary. I began the process thinking that it would be really fun to have a website that kept track of restaurants in a similar was to Goodreads for books. My version is of course scaled back, but it’s basically a list of all the restaurants that you’ve eaten at with your own reviews of them, and then a list of restaurants you are hoping to eat at.

I created 3 models, users, visited restaurants, and unvisited restaurants. The restaurant models belong to users and the users have many restaurants.

I decided I wanted to add some style to this project because I haven’t revisited css and html for almost a year. It took me a bit of googling around and going back to some of the learn lessons to get back to remembering how everything works, but it was definitely helpful to refresh myself on all this information at this point in the course.

The one error that really held me up throughout this process was using find_by instead of find when searching for an object based on the object’s id. It was finding the first object in the list and changing that one, but not throwing up an error. I couldn’t figure out why this was happening, but with some help from a coach I was finally able to catch the problem and move forward with the project.

Can’t wait to keep going!