Ruby Rails Application

by aj-geddes3f5182cfd739No license355 starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 7 months ago

Develop Ruby on Rails applications with models, controllers, views, Active Record ORM, authentication, and RESTful routes. Use when building Rails applications, managing database relationships, and implementing MVC architecture.

Includes scriptsSoftware Development
AI-generated overview

Guides building Ruby on Rails applications with Active Record models, RESTful controllers, JWT authentication and migrations.

What it does
Provides reference guides and conventions for developing Ruby on Rails applications, covering project setup, Active Record models and associations, database migrations, RESTful controllers, JWT authentication, Active Record queries and serializers. It also ships a schema validation script and a migration template. The output is guidance and scaffolding for Rails code rather than a finished application.
When to use it
Use when building or extending a Rails web application, defining model associations, writing migrations, creating RESTful controllers, or adding JWT-based authentication. It is aimed at developers working within Rails conventions.
Requirements
A Ruby on Rails environment with a database such as PostgreSQL, plus the ability to run Rails commands. It ships an executable shell script and a SQL migration template.

Ruby Rails Application

Table of Contents

Overview

Build comprehensive Ruby on Rails applications with proper model associations, RESTful controllers, Active Record queries, authentication systems, middleware chains, and view rendering following Rails conventions.

When to Use

  • Building Rails web applications
  • Implementing Active Record models with associations
  • Creating RESTful controllers and actions
  • Integrating authentication and authorization
  • Building complex database relationships
  • Implementing Rails middleware and filters

Quick Start

Minimal working example:

bash
rails new myapp --api --database=postgresqlcd myapprails db:create

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Rails Project Setup [blocked]Rails Project Setup
Models with Active Record [blocked]Models with Active Record
Database Migrations [blocked]Database Migrations
Controllers with RESTful Actions [blocked]Controllers with RESTful Actions
Authentication with JWT [blocked]Authentication with JWT
Active Record Queries [blocked]Active Record Queries
Serializers [blocked]Serializers

Best Practices

✅ DO

  • Use conventions over configuration
  • Leverage Active Record associations
  • Implement proper scopes for queries
  • Use strong parameters for security
  • Implement authentication in ApplicationController
  • Use services for complex business logic
  • Implement proper error handling
  • Use database migrations for schema changes
  • Validate all inputs at model level
  • Use before_action filters appropriately

❌ DON'T

  • Use raw SQL without parameterization
  • Implement business logic in controllers
  • Trust user input without validation
  • Store secrets in code
  • Use select * without specifying columns
  • Forget N+1 query problems (use includes/joins)
  • Implement authentication in each controller
  • Use global variables
  • Ignore database constraints

Source and attribution

Source:aj-geddes/useful-ai-promptsinskills/ruby-rails-applicationat commit3f5182c

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal