rails-guides
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRails Guides
Rails 指南
Official Rails documentation for reference during development.
开发过程中可供参考的官方Rails文档。
Topic Map
主题目录
Getting Started
入门指南
- — Rails basics, MVC overview, first app walkthrough
references/getting_started.md - —
references/command_line.mdcommand, generators, rake tasksrails - — Environments, initializers, credentials, database.yml
references/configuring.md - — Zeitwerk, module naming, reload behavior
references/autoloading_and_reloading_constants.md - — Rails boot sequence, railties, engines
references/initialization.md
- — Rails基础、MVC概览、首个应用实操教程
references/getting_started.md - —
references/command_line.md命令、生成器、rake任务rails - — 环境配置、初始化器、凭证、database.yml
references/configuring.md - — Zeitwerk、模块命名、重载行为
references/autoloading_and_reloading_constants.md - — Rails启动流程、railties、引擎
references/initialization.md
Active Record
Active Record
- — Models, CRUD, conventions, migrations
references/active_record_basics.md - — Finders, scopes, joins, includes, explain
references/active_record_querying.md - — Built-in validators, custom validators, errors
references/active_record_validations.md - — Lifecycle hooks, after_commit, skip_callback
references/active_record_callbacks.md - — belongs_to, has_many, has_one, HABTM, polymorphic
references/association_basics.md - — Schema changes, reversible migrations, db:migrate
references/active_record_migrations.md - — Encrypting attributes at rest
references/active_record_encryption.md - — Multi-column primary keys
references/active_record_composite_primary_keys.md - — Multi-DB setup, sharding, replicas
references/active_record_multiple_databases.md - — PostgreSQL-specific features (hstore, jsonb, arrays)
references/active_record_postgresql.md - — ActiveModel outside ActiveRecord, form objects
references/active_model_basics.md
- — 模型、CRUD、约定规则、迁移
references/active_record_basics.md - — 查找器、作用域、连接查询、预加载、执行计划解释
references/active_record_querying.md - — 内置验证器、自定义验证器、错误处理
references/active_record_validations.md - — 生命周期钩子、after_commit、跳过回调
references/active_record_callbacks.md - — belongs_to、has_many、has_one、HABTM、多态关联
references/association_basics.md - — Schema变更、可逆迁移、db:migrate
references/active_record_migrations.md - — 静态属性加密
references/active_record_encryption.md - — 多列主键
references/active_record_composite_primary_keys.md - — 多数据库配置、分库、只读副本
references/active_record_multiple_databases.md - — PostgreSQL专属特性(hstore、jsonb、数组)
references/active_record_postgresql.md - — 独立于ActiveRecord的ActiveModel、表单对象
references/active_model_basics.md
Action Controller
Action Controller
- — Controllers, params, filters, sessions, cookies
references/action_controller_overview.md - — Streaming, live, metal, http auth
references/action_controller_advanced_topics.md - — Resources, namespaces, constraints, named routes, URL helpers
references/routing.md
- — 控制器、参数、过滤器、会话、Cookie
references/action_controller_overview.md - — 流式传输、实时响应、Metal、HTTP身份验证
references/action_controller_advanced_topics.md - — 资源路由、命名空间、路由约束、命名路由、URL辅助方法
references/routing.md
Action View
Action View
- — Templates, partials, layouts, formats
references/action_view_overview.md - — form_with, link_to, tag, content_tag, asset helpers
references/action_view_helpers.md - — form_with, field helpers, nested forms, uploads
references/form_helpers.md - — render, redirect_to, respond_to, layout inheritance
references/layouts_and_rendering.md
- — 模板、局部模板、布局、格式
references/action_view_overview.md - — form_with、link_to、tag、content_tag、资源辅助方法
references/action_view_helpers.md - — form_with、字段辅助方法、嵌套表单、文件上传
references/form_helpers.md - — render、redirect_to、respond_to、布局继承
references/layouts_and_rendering.md
Frontend / Hotwire
前端 / Hotwire
- — Import maps, Turbo, Stimulus overview
references/working_with_javascript_in_rails.md - — Rich text with Trix, attachments
references/action_text_overview.md
- — 导入映射、Turbo、Stimulus概览
references/working_with_javascript_in_rails.md - — 基于Trix的富文本、附件功能
references/action_text_overview.md
Jobs & Mailers
任务与邮件程序
- — Job classes, queues, retry, test helpers
references/active_job_basics.md - — Mailers, templates, deliveries, previews
references/action_mailer_basics.md - — Incoming email routing and processing
references/action_mailbox_basics.md
- — 任务类、队列、重试、测试辅助方法
references/active_job_basics.md - — 邮件程序、模板、发送配置、预览
references/action_mailer_basics.md - — 入站邮件路由与处理
references/action_mailbox_basics.md
Storage
存储
- — File uploads, variants, direct uploads, S3/GCS/Azure
references/active_storage_overview.md
- — 文件上传、变体、直传、S3/GCS/Azure支持
references/active_storage_overview.md
Testing
测试
- — Minitest, fixtures, test types, helpers, assertions
references/testing.md
- — Minitest、固件、测试类型、辅助方法、断言
references/testing.md
Real-Time
实时功能
- — WebSockets, channels, broadcasting, connections
references/action_cable_overview.md
- — WebSockets、频道、广播、连接
references/action_cable_overview.md
Security & Performance
安全与性能
- — SQL injection, XSS, CSRF, mass assignment, secure headers
references/security.md - — Fragment, action, HTTP caching, cache stores
references/caching_with_rails.md - — Sprockets, Propshaft, precompile, digests
references/asset_pipeline.md - — Puma, connection pooling, GC
references/tuning_performance_for_deployment.md
- — SQL注入、XSS、CSRF、批量赋值、安全响应头
references/security.md - — 片段缓存、动作缓存、HTTP缓存、缓存存储
references/caching_with_rails.md - — Sprockets、Propshaft、预编译、摘要
references/asset_pipeline.md - — Puma、连接池、垃圾回收优化
references/tuning_performance_for_deployment.md
Internationalization
国际化
- — Translation files, locale, pluralization, date formats
references/i18n.md
- — 翻译文件、区域设置、复数规则、日期格式
references/i18n.md
API & Rack
API & Rack
- — API-only Rails, slim middleware stack
references/api_app.md - — Middleware stack, Rack integration
references/rails_on_rack.md
- — 仅API模式的Rails、精简中间件栈
references/api_app.md - — 中间件栈、Rack集成
references/rails_on_rack.md
Advanced
高级功能
- — String, Array, Hash, Date extensions
references/active_support_core_extensions.md - — Notifications, log subscribers
references/active_support_instrumentation.md - — Association options, eager loading strategies
references/association_basics.md - — debug gem, logger, web-console, byebug
references/debugging_rails_applications.md - — Error::Reporter, Sentry integration
references/error_reporting.md - — Thread safety, executor, reloader
references/threading_and_code_execution.md - — Version upgrade paths, deprecation handling
references/upgrading_ruby_on_rails.md
- — String、Array、Hash、Date扩展方法
references/active_support_core_extensions.md - — 事件通知、日志订阅器
references/active_support_instrumentation.md - — 关联选项、预加载策略
references/association_basics.md - — debug gem、日志器、web-console、byebug
references/debugging_rails_applications.md - — Error::Reporter、Sentry集成
references/error_reporting.md - — 线程安全、执行器、重载器
references/threading_and_code_execution.md - — 版本升级路径、弃用处理
references/upgrading_ruby_on_rails.md