Tutorials


How ActiveRecord Uses Caching To Avoid Unnecessary Trips To The Database
A general way to describe caching is storing the result of some code so that we can quickly retrieve it later. In some cases, this means storing a computed value to avoid needing to recompute it later. However, we can also cache data by simply kee...

Rails 6.1 adds support for belongs_to to has_many inversing
Before Rails 6.1, we could only traverse the object chain in one direction - from has_many to belongs_to. Now we can traverse the chain bi-directionally.The inverse_of option, both in belongs_to and has_many is used to specify the name of the inve...





Magic Responsive Tables with Stimulus and IntersectionObserver
You’re working on this data table for your app. It’s mostly server-side HTML. Nothing fancy.But as you’re adding columns, you’ve got a problem. How are you going to handle small screens?The table has to scroll horizontally to let the user see all ...
