Tutorials

Controlling superclass argument pass-through in Ruby
In Ruby class-based programming, superclass versions of subclass methods are always invoked explicitly using the super keyword. There are some nuances to using super though, particularly when it comes to passing (or not passing) arguments and bloc...


Internationalize a medium Rails App with Vue frontend effectively with tooling
TLDR: I released a Ruby CLI tool that can semi-automatically extract raw Strings from Ruby-files, SLIM, ERB-Views and Vue-Pug templates. Read on about the background.Recently, we started to internationalize our ATS (Applicant tracking system) recr...




Rails 6.1 deprecates rails db:structure:dump and rails db:structure:load
Rails 6.1 deprecates rails db:structure:load and rails db:structure:dump tasks.Before Rails 6.1, executing rake db:schema:dump would dump db/schema.rb file. And executing rake db:structure:dump would dump db/structure.sql file.Rails provides confi...


Building a Ractor based logger that will work with non-Ractor compatible code
But we want to share a logger, right? Well, not exactly. What we want is to be able to use the same API to log pieces of information. And that’s the key point here.We can bypass all of our problems quickly. We just need a separate Ractor that will...

Solve race condition using database trigger function
As example, we have a Budget model, which have allocation_cents as the amount allocated for the budget, which can be used to buy the items proposed in the budget.A budget can have many_items, and we need make sure that the sum of the items' price ...