Keep your components
Register an existing Partial or ViewComponent with a closed schema and explicit policies.
Register a component
Turn trusted Rails components into persistent, interactive tools. Start without AI and add an adapter when you need one.
Development documentation for main. Choose the stable version for the published gem.
bundle add rails_tool_views --git https://github.com/yorzi/rails_tool_views --branch main
After you register the tutorial ChoiceCard:
scope = RailsToolViews::Scope.new(actor: "alice", tenant: "demo")
surface = RailsToolViews.present(:choice_card, props: { title: "Next step" }, scope: scope)
RailsToolViews.restore(surface.id, scope: scope)
Build the complete example or understand the state boundary.