You are probably familiar with the 'if else' control flow but there are certain situations where there may be a visually better way to write these statements. Here we will discuss how you can achieve this via the 'unless' keyword in Ruby and the different ways you can use it.
Posted June 18, 2021 - tagged ruby ‐ 3 min read
In Ruby, the classic 'switch statement' is possible with the *case/when* keywords. Whenever if statements become too long and start looking messy you might want to consider using the case statement to write cleaner code.
Posted April 27, 2021 - tagged ruby ‐ 4 min read
Tailwind and Bootstrap are the most used CSS framework by now. Let's see how they compare - with the bias of a Ruby-on-Rails developer point of view.
Posted April 6, 2021 - tagged ruby-on-rails ‐ 4 min read
Webpacker and Sprockets both try to manage the frontend assets of Ruby-on-Rails applications. They are both integrated inside default Rails applications. But they're doing the same job actually, so after 4 years of using both, it's time to choose.
Posted April 1, 2021 - tagged ruby-on-rails ‐ 5 min read
More often than not, you have to check if an object is empty or not, to avoid the famous *NullPointerException* - which is a *NoMethodError* in Ruby.
Posted March 30, 2021 - tagged ruby ‐ 7 min read