This blog will be a tutorial on how to implement a like function into a rails application. One thing to take note of before we begin is that while this is aimed at people who are relatively new to Rails, you will need a level of foundational knowledge in order to get the most out of this blog, if you have trouble understanding the terms I use I recommend googling around for some more comprehensive blog posts that cover the basics before coming back here to learn this specific implementation.
The first thing we need to do is map out the relationships between our models, and take note that you don’t need to name your models the same as mine, mine are just examples. Carrying on, our User models will have many Likes, our Posts will also have many Likes, and each Like will belong to an individual User and a single Post. These relationships can be imagined like…
Hello, my name is Ariel Grubbs, and this is the first of a series of blogs I will write about my experience learning programming. It will hopefully prove helpful to some of you out there who are also just getting started in the programming world, or are just looking to get another perspective.
So, with introductions out of the way, let’s get started with our topic for today: The Importance of Explicitly Ending Methods Before Calling Other Methods in Ruby. Not a very catchy title. I was recently creating a CLI project where my idea was to send the user into a chain of methods that would display choices for them and allow them to navigate through the application with a degree of freedom, and while making this program I kept running into the problem of my code looping back to an earlier point without the user telling it to do so. …