| name | active-interaction-coder |
| description | Implement typed business operations with ActiveInteraction. Covers input types, composition, controller patterns, and testing. |
ActiveInteraction Coder
Typed business operations as the structured alternative to service objects.
Why ActiveInteraction Over Service Objects
| Service Objects | ActiveInteraction |
|---|
| No standard interface | Consistent .run / .run! |
| Manual type checking | Built-in type declarations |
| Manual validation | Standard Rails validations |
| Hard to compose | Native composition |
| Verbose boilerplate | Clean, self-documenting |
Setup
gem "active_interaction", "~> 5.3"
Simple Interaction
module Users
class Create < ActiveInteraction::Base
string :email
string :name
string :password, default: nil
validates , , { }
validates ,
user = .create!(
email,
name,
password || .alphanumeric()
)
.welcome(user).deliver_later
user