Tutorials
Running Rails Development with a Fake Domain and SSL
Sometimes you need to test a feature that requires not just SSL (https) but also to run under a certain domain. For example, testing an OAuth application will mean running your development environment at the right callback URL, especially when the...
Containerize a Rails 7 App and Run it on Vultr with Cloud 66
To celebrate a 3-year integration anniversary between Cloud 66 and Vultr we’re showcasing some of the changes and improvements that we have implemented in both of our platforms. To show how well our platforms work together, we’re taking a Rails 7 ...
Solving N 1 Postgres queries for Ruby on Rails apps
Crunchy Data is getting ready to be at RailsConf 2023 in Atlanta next week and we’ve been thinking about our Rails and ActiveRecord users and customers. One of the easiest ways to improve query performance using an ORM is to lean on as much SQL as...
Build a Memory Game with Rails, Stimulus JS, and Tailwind CSS - Semaphore
Stimulus is a JavaScript framework that’s designed to augment your HTML with modest ambitions and just enough behavior to make it shine. It doesn’t seek to take over your entire front-end, nor is it concerned with rendering HTML.In this exercise, ...
Ruby's Switch Statement is More Flexible Than You Thought
Ruby's switch statement is very versatile and flexible, especially due to the dynamic nature of Ruby. In this post, we'll see how you can use it in various ways. We'll also learn why it works the way it works. Hint: it uses the `===` operator (met...
Hacking Rails Implicit Rendering for View Components
Understanding how Rails handles requests from routes.rb to calling the action method on a controller makes it possible to build Rails plugins ranging from Hanami-like action classes to component-driven Rails development.Have you ever opened a Rail...