This post is part of the A JavaScript Developer’s Guide to Rails series
Rails conventions explained for developers coming from the JavaScript ecosystem.
- Series Introduction
- Where Does Everything Come From? (coming soon)
- What Does Composition Over Inheritance Mean? (coming soon)
- ActiveRecord Fundamentals (coming soon)
- Database Management and Schema (coming soon)
- What is a Polymorphic Rails Model? (coming soon)
- Authorization with Pundit (coming soon)
Your first week on a Rails project is disorienting. You open a model file expecting column definitions—there aren’t any. You see current_user in a controller and can’t find the import. You run rails db:migrate and wonder why there’s also a schema.rb file.
The team moves fast. They don’t think twice about this stuff because Rails conventions became invisible to them years ago.
Who is this for?
JavaScript developers joining Rails teams. You’re a React or Node developer at a company that maintains Rails applications. Or you joined thoughtbot and your first client uses Rails. Or you’re tired of Express and want to try something different.
I assume you’ve built things with JavaScript—you know async/await, classes, and modules. I don’t assume you know anything about Ruby.
Why write this?
When I started on Rails, I found “Learn Rails from scratch” tutorials that assume you’re new to programming entirely. I didn’t need to learn what a web server is. I needed to understand why Rails handles things differently than the JavaScript ecosystem I already knew.
I also found resources for Rails developers wanting a refresher. These assumed familiarity with conventions I didn’t have.
I needed a bridge: “Here’s how you do X in JavaScript. Here’s how Rails handles it instead. Here’s why.”
Reading order
Each article stands alone. Confused about where belongs_to comes from? Read the first one. Debugging migrations? Jump to the database article.
If you want a starting point, “Where Does Everything Come From?” explains the foundational pattern that everything else builds on.
Each article runs 10-15 minutes. The whole series takes about an hour.
What I skipped
Frontend integration, asset pipeline, Hotwire, deployment, testing, API-only Rails. All worth learning, but this series focuses on backend patterns—the stuff that confused me most.
JavaScript makes you explicitly import everything. Rails hides the wiring and expects you to learn the conventions. After a few weeks of feeling lost, the conventions click and you stop thinking about them. That’s when Rails starts feeling fast instead of magical.