You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli): emit validatesPresenceOf and type validations from model attrs (#2219) (#2224)
Typed attrs passed to `wheels generate model` (e.g. `name:string email:email`)
were parsed into the migration but dropped from the generated model's config(),
producing an empty scaffold. Populate context.validations in CodeGen.generateModel
from the properties array, add a {{validations}} placeholder to ModelContent.txt,
and update the Templates.cfc substitution block to consume the pre-built string
(previously it unconditionally overwrote the generic-loop output with "" because
its only input was a never-set context.attributes).
Emits combined validatesPresenceOf("a,b,c") for all attrs plus per-property
validatesFormatOf for email and url types. Scaffold and api-resource inherit
the fix since both route through CodeGen.generateModel.
Strengthens tools/ci/smoke-test-module.sh to assert the new behavior and adds
CodeGenSpec coverage for combined presence, email format, URL format, and the
empty-properties case.
0 commit comments