Oh the tale of working on Rails

Christopher Breen
2 min readFeb 7, 2021

The best description I had for rails at the start of this section was Sinatra on steroids. I still think this to be true, theres an abundance of features of rails that make building a web application with it so much easier and also cleaner.

The application i decided to build this project is a game resource and organization tool. The application provides the users with the ability to login, signup and logout as well as allows them to login from google. The app allows non user to see all games that users have added. Users can add games to the general games list as well as add the platforms they own and link games to that platform. Users can also review any game on the games list.

Forms one of the beauties of rails that i mentioned earlier. It allows us to build a _form.html.erb view inside of games view and call if for both editing and adding a new game. The beauty of reusing our code with out having in typed out all over in a new place. As you can see it simply allows us to call <%= render “form” %> and when our controller hits new it will call the form view under our H1.

Just like that we’ve been able to have users create and edit games with one form and a lot less clutter in our views allowing us to keep it DRY. Another great feature of rails is link_to allowing us to turn the title of each of our games into links that once clicked redirect the user to the show page of that specific game. So thats some of the beauty of rails, the simplicity that keeps it DRY and allows code to be easily reused.

--

--

Christopher Breen

Leader in Hospitality turned hopeful coder learning to become a software engineer.