Cursor Rules for Ruby on Rails: 6 Rules That Make AI Write Real Rails Code Cursor generates Rails code fast. The problem? It generates code that technically works but violates every convention Rails developers have spent 20 years refining β business logic in controllers, missing validations, no strong params, fixture-heavy tests, callback hell, and non-RESTful routes that make experienced Rails devs wince. You can fix this with targeted rules in your .cursorrules or .cursor/rules/*.mdc files. Here are 6 rules I use on every Rails project, with before/after examples showing exactly what changes. Rule 1: Fat Models, Skinny Controllers β Always Follow the Rails Way Follow the Rails Way: fat models, skinny controllers. Controllers should only handle: params, calling a model/service, and rendering a response. All business logic, scopes, and data transformations belong in models. Never put query logic, conditional business rules, or data formatting in controllers.β¦