plutonium-connect-resource

Connect Rails resources to portals with the pu:res:conn generator.

68|10|Updated Jan 10, 2024
One-click install
npx skills add https://github.com/radioactive-labs/plutonium-core --skill plutonium-connect-resource
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plutonium-connect-resource
Source: https://github.com/radioactive-labs/plutonium-core/tree/main/.claude/skills/plutonium-connect-resource
Command: npx skills add https://github.com/radioactive-labs/plutonium-core --skill plutonium-connect-resource

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Connect existing resources to portals to expose web interfaces and routes within a multi-portal Rails app.

Core Features & Use Cases

  • Use the pu:res:conn generator to connect resources from the main app to portaled portals, wiring controllers, policies, and definitions for portal access.
  • Supports both main-app resources and namespaced resources from feature packages, including singular resources, with consistent route registration.
  • Example: connect Post and Comment to admin_portal to enable portal-based CRUD operations.

Quick Start

Run the pu:res:conn generator to connect a resource to a portal, for example rails g pu:res:conn Post --dest=admin_portal

Frequently Asked Questions about plutonium-connect-resource

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect a Rails resource to a portal for web access?

To connect a Rails resource to a portal, use the pu:res:conn generator. This command wires controllers, policies, and definitions to expose web interfaces and register routes for portal-based CRUD operations.

Can I connect multiple Rails models to a single portal at once?

Yes, you can connect multiple existing Rails models to a portal simultaneously. The generator supports both single and multi-resource connections across app and portal boundaries to ensure routed access.

What is the command to expose a Rails model through a portal interface?

The command to expose a Rails model through a portal interface is the pu:res:conn generator. Running it with a model name and destination portal handles resource registration and route wiring.

Does the Rails portal generator support namespaced resources from feature packages?

Yes, the generator supports namespaced resources from feature packages, including singular resources. It ensures consistent route registration and portal-specific configurations across boundaries.

What is the best way to wire portal routes for existing Rails models?

The best way to wire portal routes for existing Rails models is using the pu:res:conn generator. It handles resource registration, portal routes, and basic portal-specific configurations for coherent portal packaging.

Do I need to manually configure portal policies when connecting a Rails resource?

No, you do not need to manually configure portal policies when connecting a Rails resource. The generator handles portal-specific configurations and policies, wiring controllers and definitions automatically.