Tutorials

The Case for Pattern Matching Key Irreverence in Ruby
I had alluded to this post a bit earlier on Twitter, and in the Ruby bug tracker, but wanted to more fully write out my thoughts on what could be an incredibly powerful paradigm shift in how Ruby treats pattern matching on hash-like objects.That i...

Understading why attr_accessor in Ruby is faster than a regular method
Setters and getters (or accessors) are very common in various object–oriented programming languages. Some languages have shortcuts to define them, others require programmers to write them by hand (hi, Java!). Ruby does have these shortcuts: attr_r...

Rails allows specifying the maximum number of records that will be destroyed in a single background job. | Saeloun Blog
Rails 6 had added the :destroy_async option to delete the associated records in a background job whenever the foreign_key constraint would be disabled.But what if the associated records are too large? In this case, by default, the single backgroun...


Using ActiveRecord with SQLite DB in a JRuby Desktop App
SQLite is the simplest relational database to use from JRuby desktop applications, it is built-in on all platforms (Mac, Windows, and Linux), and it can be utilized conveniently via ActiveRecord, the Rails object-relational mapping library followi...

Rails allows using aliased attributes with insert_all and upsert_all | Saeloun Blog
All of us would have used aliases with SQL queries as it makes the table and column names more readable. The renaming is just a temporary change and the table name does not change in the original database.Rails now support aliased attributes with ...

Creating A Web Game With Godot On Rails 7? - YouTube
Ruby on Rails 7 and games aren't really a mix I ever thought would happen. But today we're going to cover how to run a Godot Engine game in Ruby on Rails 7.Because we're not here to ask if we should, we're here to ask if we could.@FinePointCGI 's ...

Ruby on Rails 82 Chained Select Fields in a form. Gem City-State - YouTube
Episode source code: https://github.com/corsego/82-gem-cit...Gem city-state:https://github.com/loureirorg/city-state0:00 Intro1:00 Scaffold Addresses1:41 Gem City-State5:25 Basic validations6:09 Advanced validations12:00 Humanize labels13:45 Form ...


How to Build a Calculator With Hotwire and No Javascript - YouTube
In this video, I'll show you how you can build a calculator with Ruby on Rails' Hotwire, without any Javascript.🎥 Join my new Ruby on Rails Class here: https://mixandgo.com/rails-class👉 Buy my Bulletproof Ruby on Rails Applications eBook: https:...