Problem
Running:
wheels generate model User name:string email:string
produces a model with an empty `config()`:
component extends=\"Model\" {
function config() {
}
}
The attr specs (`name:string`, `email:string`) are dropped — the current `ModelContent.txt` template only fills in relationship scaffolds (`belongsToRelationships`, `hasManyRelationships`, `hasOneRelationships`), not validations or type hints.
Expected
The issue template in #2208 (and the docs in CLAUDE.md — Model Quick Reference) imply that typed attrs should round-trip into the model's `config()` as validations:
component extends=\"Model\" {
function config() {
validatesPresenceOf(\"name,email\");
// maybe: validatesFormatOf(property=\"email\", regEx=\"...\") for type=email
}
}
This matches Rails `rails generate model User name:string email:string` behavior and is what the ecosystem expects.
Discovered via
Adding the #2208 smoke test (#2217) — initially asserted `validatesPresenceOf` per #2208's example, failed, confirmed the generator doesn't emit it, weakened the assertion to just `extends="Model"` + `function config`. The smoke test now passes but the expectation gap remains.
Acceptance criteria
Related
Problem
Running:
produces a model with an empty `config()`:
The attr specs (`name:string`, `email:string`) are dropped — the current `ModelContent.txt` template only fills in relationship scaffolds (`belongsToRelationships`, `hasManyRelationships`, `hasOneRelationships`), not validations or type hints.
Expected
The issue template in #2208 (and the docs in CLAUDE.md — Model Quick Reference) imply that typed attrs should round-trip into the model's `config()` as validations:
This matches Rails `rails generate model User name:string email:string` behavior and is what the ecosystem expects.
Discovered via
Adding the #2208 smoke test (#2217) — initially asserted `validatesPresenceOf` per #2208's example, failed, confirmed the generator doesn't emit it, weakened the assertion to just `extends="Model"` + `function config`. The smoke test now passes but the expectation gap remains.
Acceptance criteria
Related