| name | ruby-rails |
| description | Ruby on Rails framework patterns — ActiveRecord, controllers, concerns, service objects, background jobs, and API mode |
| layer | domain |
| category | backend |
| triggers | ["ruby","rails","activerecord","ruby on rails","rails api","sidekiq","rails migration"] |
| inputs | ["application requirements","Rails version","database choice"] |
| outputs | ["models","controllers","services","migrations","tests","configuration"] |
| linksTo | ["postgresql","redis","testing-patterns","cicd","docker"] |
| linkedFrom | ["api-designer","authentication"] |
| preferredNextSkills | ["postgresql","testing-patterns"] |
| fallbackSkills | ["api-designer"] |
| riskLevel | low |
| memoryReadPolicy | selective |
| memoryWritePolicy | none |
| sideEffects | ["database migrations","gem installations"] |
Ruby on Rails
Purpose
Rails is a full-stack MVC framework optimized for developer productivity with strong conventions. This skill covers modern Rails patterns (Rails 7+), API mode, ActiveRecord best practices, service objects, and background job processing.
Key Patterns
Model — ActiveRecord Best Practices
class Order < ApplicationRecord
belongs_to :customer
has_many :order_items, dependent: :destroy
has_many :products, through: :order_items
has_one :shipment
validates :status, presence: true, inclusion: { in: %w[pending confirmed shipped delivered] }
validates :total_cents, numericality: { greater_than_or_equal_to: 0 }
scope :recent, -> { where("created_at > ?", 30.days.ago) }
scope :pending, -> { where(status: "pending") }
scope :with_items, -> { includes(:order_items, :products) }
enum :status, { pending: 0, confirmed: 1, shipped: 2, delivered: 3 }
after_create
pending?
update!( , .current)
.confirmation().deliver_later