Ruby, map with index
Intro Just like many other programming languages, the Map method is also in ruby. You use a ruby map or map, in general, to transform the data and perform functions on each element of the object. ...
Intro Just like many other programming languages, the Map method is also in ruby. You use a ruby map or map, in general, to transform the data and perform functions on each element of the object. ...
0. Motivation We are building BootrAils on top of the last Rails version. When Rails 7 came out, it was (kind of) a relief to see a replacement for Webpacker. Whereas the new assets pipeline looks...
strftime for the impatients Sometimes examples worth a thousand words, so here are some that could help you right away (example inspired from APIDoks) : d = DateTime.new(2021,11,19,8,37,48,"-06:0...
0. Motivation At BootrAils, until recently, we were uncomfortable about what could be a decent default authentication in any new Rails app - until Rodauth appeared under the radar. There are no ...
What are Enumerators ? This section will give you a general understanding of a few important terms and their distinctions. Before we start using them, we need to understand the concept of Enumerat...
1. Motivation At BootrAils, we are using this script every (working !) day. It allows you to : grab any concept, isolate a bug quickly, play with new Rails features, … without any side ...
0. A big warning At BootrAils, we are very excited that Rails 7 is out since mid-december, 2021. The frontend assets management is once again completely different. Rails 6 almost dropped Sprockets...
Introduction Let’s say you have a table named “books”, and an associated model named “Book”. You want to add the column “author”. Tools used in this tutorial : Rails 6.1.3, Ruby 3 Note that thi...
Requirements Tools used : Rails 6.1.3, Ruby 3 What is a form ? A web form is not a Rails concept, a form is a way to send data to a server. There are many other ways to achieve this, but using t...
Unless you already know… When we use an if statement we want to check whether a condition is true or not. If it is true, you execute a block of code. If it is false, the code does not get executed...