Home › All rules › Community › Rails Cursor Rules
Rails Cursor Rules
Cursor rules for Rails development with basic setup.
CursorRuby on RailsCommunity (CC0)
How to use
Save this as .cursor/rules/rails-cursorrules-prompt-file.mdc in your project, commit it, and Cursor will load it. Review it first: community files can be opinionated or out of date.
Note: Review and test before use. Provided as is, without warranty. See Terms.
.cursor/rules/rails-cursorrules-prompt-file.mdcDownload ---
description: "Cursor rules for Rails development with basic setup."
globs: **/*
alwaysApply: false
---
Rails 8 Development Guidelines
- Prefer Rails command-line generators over hand-written boilerplate.
- Use `bin/dev` for local development and check logs after significant changes.
- Follow Rails 8 conventions for Solid Queue, Solid Cache, Solid Cable, Propshaft, and Kamal where appropriate.
- Keep controllers RESTful and focused; use service objects for complex business logic.
- Use PostgreSQL, proper indexes, connection pooling, and safe migrations.
- Write Minitest coverage for models, controllers, and integration flows.
- Use Hotwire for standard Rails interactivity and Vite only when npm-managed JavaScript is needed.