Ruby : The 'unless' keyword

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

Rails with Webpacker : a full setup

Webpacker is a wrapper around Webpack, but is not fully used in a default new Rails application. Let's see how to set up Rails with Webpacker, in order to use any kind of frontend assets.

Posted May 18, 2021 - tagged ruby-on-rails

9 min read

Rails 7 : a preview

I'm not part of the Rails team, I'm just a daily Rails developer. So this list comes only from my imagination. Let's dream.

Posted May 8, 2021 - tagged ruby-on-rails

6 min read

Rails : How to work with Bootstrap v5

A tiny article to explain the workflow when you work with Bootstrap v5.

Posted May 6, 2021 - tagged ruby-on-rails

3 min read

How to write a switch statement in Ruby

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

Ruby private method : a hack

A tiny hack about how to declare and use private method in Ruby.

Posted April 13, 2021 - tagged ruby

4 min read

How to create a custom Bootstrap theme for Rails

A step-by-step tutorial about how to create a custom Bootstrap v5 theme for Rails

Posted April 6, 2021 - tagged ruby-on-rails

4 min read

Tailwind vs Bootstrap, from a Rails developer point of view

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 vs Sprockets : the battle is over

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

Check emptiness in Ruby : nil? vs blank? vs empty? vs presence?

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