Generators are a powerful feature you can use to automate routine tasks in Rails—but do you know how to make your own? This article explores Rails generators in depth, including how to build a generator from scratch.
Accepting user input is critical to modern Rails applications, but without validations, it can cause problems. In this article, learn how to use
ActiveModel validations to ensure the data you process is safe.
Want to deploy a Rails app with Docker and AWS, but not sure where to start? AWS Fargate simplifies the convoluted process of deploying Docker on Amazon's Elastic Container Service (ECS). It's also a good alternative to Heroku.
Getting data into your database is easy, but querying large datasets is challenging—especially without the right indexes. Pavel Tkachenko teaches how to write performant SQL queries with EXPLAIN and ANALYZE.
Internationalization means adapting your application to the language and culture of your users—a difficult task! Luckily, Rails provides the I18n API. In this article, Pavel Tkachenko shows us how to start translating.
Rails defaults to minitest, but much of the community has adopted RSpec—which is right for you? In this article, William Kennedy compares RSpec and Minitest in a new Rails app.
If you're finding performance bottlenecks with full-text search in your database, it may be time to switch to Elasticsearch. In this tutorial, Ianis introduces Elasticsearch and shows us how to implement an efficient search feature in Rails.
Containers are popular because they create a reproducible environment that you can deploy to production and run locally in development. However, containerizing a Rails app can be tricky—Jeff Morhous helps us navigate the pitfalls.
PostgreSQL and MySQL are great for structuring data using relationships, but what if you don't always know the structure up-front? That's where
ActiveRecord::Store really shines. It's like NoSQL, without changing databases.
Do you need to process a lot of data in real time? Event streaming is a pattern that could help. David Sanchez walks us through how to do event streaming in Rails with Apache Kafka, the popular open-source event streaming platform.
Have you ever wanted to accept payments in Rails? With Stripe Checkout, it's never been easier. Jeffrey Morhous shows us how.
You've probably used
Rails.cache to read, write, and fetch cached data in Rails—but did you know you can also work with counters? In this series, Jonathan Miles introduces us to some of the lesser-known tools hidden in your Rails codebase.
Race conditions are hard to debug—especially when you don't know it's a race condition! This article looks at some common race conditions and the best solutions for handling each one.
There are many excellent authorization libraries for Rails, but did you know it's not that hard to build this functionality yourself? In this article, Renata Marques shows us how to use the Policy Object Pattern to implement access control in our Rails apps.
S3 is an excellent way to store files scalably and reliably. This article by Jeff Morhous will show you how to use S3 to store files uploaded to a Rails app.
GraphQL is a flexible, strongly-typed query language. It's useful because it gives front-end developers the ability to query the database without many changes to the back-end. In this article, David Sanchez shows us how to design and build our own GraphQL APIs in Rails.
Turbolinks is no longer being developed. It's been superceeded by Turbo, which is part of Hotwire. In this article, Julio Sampaio shows us how to port our existing Turbolinks apps to Turbo.
In the third and final article of our series on the OWASP Top 10 Web Application Security Risks, we’ll explore the lesser-known risks associated with the development of web applications on Rails when it comes to threats involving security misconfiguration, JSON escaping, etc.
Kubernetes is a popular way to deploy web services and applications using containers. In this, the second of a two-part series, Geshan finishes his step-by-step tutorial for getting up and running with Rails and k8s.