plutonium-model-features

Add monetary fields, SGID associations, and dynamic routing to Plutonium resource models.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Plutonium model features provide advanced capabilities for resource models, including robust monetary handling, flexible associations, and scalable routing to support complex Rails apps.

Core Features & Use Cases

  • Monetary Handling (has_cents) for storing cents and exposing decimal prices with optional naming and rate configurations.
  • Association SGID Support and associated_with for secure, multi-model data relationships.
  • URL Routing and dynamic path parameters to create SEO-friendly, stable routes across resources.
  • Entity scoping and nested attributes support for multi-tenant architectures and nested data updates.

Quick Start

Define a sample ResourceRecord model that uses has_cents, associated_with, and SGID associations to observe the features in action.

Frequently Asked Questions about plutonium-model-features

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

FAQPage Schema
How do I handle monetary fields in Rails resource models?

Use the has_cents feature to store monetary values as cents in Rails resource models. It exposes decimal prices and supports optional naming and rate configurations for accurate monetary handling.

How do I create SEO-friendly routes for multi-portal Rails applications?

Implement dynamic URL routing with parameterized paths to create SEO-friendly, stable routes across resources. This approach supports scalable routing structures for complex multi-portal Rails applications.

What is the best way to manage secure associations between models in a multi-tenant app?

Use SGID methods for secure serialization and associated_with for multi-tenant queries. These features enable secure, multi-model data relationships and entity scoping within Rails resource models.

Can I use Plutonium model features without adding extra dependencies?

Yes, Plutonium model features operate without external dependencies. You apply has_cents, associated_with, and SGID associations directly within your existing Rails Plutonium resource models.

How do I support nested data updates in Rails resource models?

Use nested attributes support within Plutonium resource models to handle nested data updates. This feature integrates with entity scoping to manage multi-tenant architectures and complex form submissions.

When do I need SGID associations in Rails resource models?

You need SGID associations when you require secure references between models and secure serialization. This is essential for exposing referenced records globally without exposing underlying database IDs.