Ruby on Rails Application

Ruby on Rails Application

Guides an AI agent to build Ruby on Rails apps with Active Record models, RESTful controllers, migrations, JWT authentication and serializers.

Skill files10 files

references/

scripts/

templates/

SKILL.md83 lines
1
---
2
name: ruby-rails-application
3
description: >
4
Develop Ruby on Rails applications with models, controllers, views, Active
5
Record ORM, authentication, and RESTful routes. Use when building Rails
6
applications, managing database relationships, and implementing MVC
7
architecture.
8
---
9
10
# Ruby Rails Application
11
12
## Table of Contents
13
14
- [Overview](#overview)
15
- [When to Use](#when-to-use)
16
- [Quick Start](#quick-start)
17
- [Reference Guides](#reference-guides)
18
- [Best Practices](#best-practices)
19
20
## Overview
21
22
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.
23
24
## When to Use
25
26
- Building Rails web applications
27
- Implementing Active Record models with associations
28
- Creating RESTful controllers and actions
29
- Integrating authentication and authorization
30
- Building complex database relationships
31
- Implementing Rails middleware and filters
32
33
## Quick Start
34
35
Minimal working example:
36
37
```bash
38
rails new myapp --api --database=postgresql
39
cd myapp
40
rails db:create
41
```
42
43
## Reference Guides
44
45
Detailed implementations in the `references/` directory:
46
47
| Guide | Contents |
48
|---|---|
49
| [Rails Project Setup](references/rails-project-setup.md) | Rails Project Setup |
50
| [Models with Active Record](references/models-with-active-record.md) | Models with Active Record |
51
| [Database Migrations](references/database-migrations.md) | Database Migrations |
52
| [Controllers with RESTful Actions](references/controllers-with-restful-actions.md) | Controllers with RESTful Actions |
53
| [Authentication with JWT](references/authentication-with-jwt.md) | Authentication with JWT |
54
| [Active Record Queries](references/active-record-queries.md) | Active Record Queries |
55
| [Serializers](references/serializers.md) | Serializers |
56
57
## Best Practices
58
59
### ✅ DO
60
61
- Use conventions over configuration
62
- Leverage Active Record associations
63
- Implement proper scopes for queries
64
- Use strong parameters for security
65
- Implement authentication in ApplicationController
66
- Use services for complex business logic
67
- Implement proper error handling
68
- Use database migrations for schema changes
69
- Validate all inputs at model level
70
- Use before_action filters appropriately
71
72
### ❌ DON'T
73
74
- Use raw SQL without parameterization
75
- Implement business logic in controllers
76
- Trust user input without validation
77
- Store secrets in code
78
- Use select \* without specifying columns
79
- Forget N+1 query problems (use includes/joins)
80
- Implement authentication in each controller
81
- Use global variables
82
- Ignore database constraints
83

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…