Explicit exposure
Register reviewed resources and fields rather than publishing reflected models.
Declare resources
Manage records with default-deny policies and one audited write path. Enable AI when your team needs it.
Add the Public Preview to the host app’s Gemfile:
gem "rails_ai_admin", "0.1.0"
Run bundle install in your host app.
The ten-minute quickstart takes an app with Rails 8 sign-in to a working Users admin; the installation guide connects other hosts. It remains closed until you supply authentication and policies.
class CustomerAdmin < RailsAiAdmin::Resource
model "Customer"
key :customers
title :name
fields do
id :id
text :name, nullable: false, required: true
end
end
The declaration narrows exposure; it grants no permission. The host owns the model,
its tenant scope and every action/field decision. Writes detect concurrent edits
through lock_version or updated_at and share the domain’s connection pool.
bin/demo --assistant serves a seeded admin on 127.0.0.1 with every feature
turned on: uploads, rich text, imports, history, charts, search, and AI chat and
MCP against an offline fake model. Open http://127.0.0.1:3917/login and click
Sign in as Admin. See
Try the Demo.
Field Types shows class-name registration, pure normalization/validation and field partials. The extension contract records the exact scalar/schema and rendering boundaries. Computed Fields derives readonly values from declared, recursively authorized scalar dependencies. Physical fields keep their actual-attribute guard; neither extension grants additional authority.
Template Overrides copies one allowlisted page, layout or partial into the host without replacing existing files. The catalog specifies its assigns/locals contract; doctor reports source/context drift for upgrade review. Host edits still own their permission, escaping and confirmation behavior.
Form Session Recovery can retain the current create/update DOM after marked authentication/CSRF failure. Fresh sign-in, manual Resume and explicit Save are required; refreshing or closing the page loses this memory-only preservation.
List Navigation carries bounded search/sort/page hints through native record and operation flows, with fresh query grants and bounded empty-page recovery. Return hints never choose an external URL or grant record/list authority.
Custom Controllers and Status Pages connects ordinary host Rails controllers/partials to fresh admin Context, explicit scoped access and the shared Runner. Fixed status pages preserve HTTP/denial boundaries without rendering normal resource navigation.
Resource Navigation supplies static groups, plain labels, fixed icons and ordering for sidebar/Overview entries. A hidden menu remains subject to the same direct route permissions; cosmetic settings confer no record or operation authority.
The Public Preview covers native CRUD, bounded collection jobs, audited operations and optional Chat, review Surfaces and MCP. Its release notes list the supported workflows and limits.