Tutorials


The 'then' Ruby Keyword - What is it? – Ben Koshy – Rails, Tekla Open API, AutoDesk .NET
Have you heard of the then method? I’d never heard of it, till now:
The best way of learning is by implementing it in some code base you are reading - preferably your own (at least that’s how I learn and experiment). Otherwise what tends to happen...

Hotwire components that refresh themselves | Boring Rails: Skip the bullshit and ship fast
Earlier this year, I made a quick tweet about a pattern that I think makes working with Hotwire apps much better.
When you need to make a bit of UI that runs some code in the background, you can use turbo_streams to ‘refresh’ the front-end when t...

Rails 8 adds ability to use multiple rate limits per controller | Prateek Codes - Learn Building Scalable Backend Systems
Rails 7.2 introduced built-in rate limiting to Action Controller. However, you could only set one rate limit per controller, which wasn’t flexible enough for real-world applications. Rails 8 solves this by allowing multiple rate limits using the n...


Using Active Storage Direct Uploads in GraphQL with Ruby on Rails
We're using GraphQL a lot, and due to it's reusability nature, we often pair it with React.js and React Native applications.
However, one challenge we faced was file uploads. GraphQL doesn't come with a built-in way to handle file uploads. While ...


Comparing Idiomatic Spaceships in Ruby - hartley mcguire
If you want to make a Ruby class comparable (ex. a > b), all you have to do is implement the "spaceship" method, <=>, and include the Comparable module. But how do you implement the spaceship?
If your class is simple, maybe a Die with 6 faces, yo...

Capture Browser Console Logs in Rails System Tests with Capybara and Cuprite · Daniela Baron
When writing Rails system tests, a common practice is to use Capybara to simulate user interactions. If the front end is a JavaScript-heavy Single Page Application (SPA), this also requires installing and configuring a JavaScript driver for Capyba...

Deploying a Rails App with Apache & MySQL on Ubuntu Server · James Hibbard
Getting a Rails application running on a remote server involves a fair bit of setup. Recently, I’ve had to go through the process a couple of times—provisioning a virtual machine, installing and configuring Apache, MySQL, Ruby, and Rails, and fina...