Rolling with Rails

Posted by Bryce Whittington on September 11, 2020

The move from Sinatra to Rails for me was a weird one. On one hand, Rails has so many features and so many ways to make creating your web app simpler. But on the other hand, it still felt like learning a whole new set of ideas (because, it pretty much was.) It turns out that making things much more standard and simpler took me just as much time as learning Sinatra from no prior knowledge. Thankfully, the versatility of Rails makes it a worthwhile grind in the end.

For my third project, I decided to challenge my coding comfortability a little bit. I feel proud of my first two projects, but ultimately they weren’t too far off from a codealong lesson or an example lecture project. This time, I asked around and watched some tutorials about useful gems I could implement to make my project stand out a little bit.

For my Sinatra project, I easily spent the same amount of time, or longer, trying to teach myself enough about CSS and add it to my project as I did creating the project itself. I found some useful videos explaining a gem called Simple Form, which not only makes writing the forms for my views easier, it allows me to maintain a standard CSS design across my forms without worrying too much about divs and classes.

The other way I wanted to challenge myself was to use this useful gem I’d heard a lot about called Devise. Devise helped me really get a better understanding of authentication and the different ways to customize the User model. I know I only scratched the surface of what this gem can do, but I totally understand why so many places recommend it.

The last new challenge I faced was giving users the ability to sign in with 3rd party sites such as Google, Facebook, etc. I chose to use OmniAuth with Google for users on my site. This was the most nerve-racking part, as I had felt pretty comfortable with my code working the way I had wanted to prior to starting with the gem. I should have just used a new branch, but eventually I was in too deep to turn back. Thankfully (almost 100% because of this video), I got it up and running with very few issues. This was cool for me, because it’s a very easy (to demonstrate) and practical skill to show to people when they ask what I’m working on at the moment.

The big takeaway from this project for me, was that learning to use new code that is designed to help make your life easier, can take a lot of time. I’m thankful I took the time to try these gems as a way of challenging me, because I’m sure I’ll be using them again. And ultimately, the time spent researching how code works, as well as troubleshooting it, helped solidify the understanding of Ruby and Rails that I may or may not have known.

I know the next project involves using Rails and Javascript, which I’m excited for. Between now and then I’m challenging myself in learning more about writing/editing HTML and CSS to help with a place I’ve struggled with my 2nd two projects.