diff --git a/web/sites/guides/src/content/docs/v4-0-0-snapshot/start-here/installing.mdx b/web/sites/guides/src/content/docs/v4-0-0-snapshot/start-here/installing.mdx index 5702e2b1c..3b16daa1b 100644 --- a/web/sites/guides/src/content/docs/v4-0-0-snapshot/start-here/installing.mdx +++ b/web/sites/guides/src/content/docs/v4-0-0-snapshot/start-here/installing.mdx @@ -48,7 +48,7 @@ Install the `wheels` CLI. Five minutes. wheels --version ``` - You should see a `Wheels Version: ` line followed by ASCII art and a `Lucee Version: ` line. Any non-empty version output means the CLI is wired up correctly. + You should see a `Wheels Version: ` line followed by ASCII art. A `Lucee Version: ` line may also appear once Lucee Express has been downloaded (typically on first `wheels start`). Any non-empty version output means the CLI is wired up correctly. @@ -84,7 +84,7 @@ The `wheels` package on the public Chocolatey feed is still the v1.x legacy (Com wheels --version ``` - You should see a `Wheels Version: ` line followed by ASCII art and a `Lucee Version: ` line. Any non-empty version output means the CLI is wired up correctly. + You should see a `Wheels Version: ` line followed by ASCII art. A `Lucee Version: ` line may also appear once Lucee Express has been downloaded (typically on first `wheels start`). Any non-empty version output means the CLI is wired up correctly. @@ -116,7 +116,7 @@ Pick LuCLI and Wheels Module versions that are known to be paired — see [CLI I wheels --version ``` - You should see a `Wheels Version: ` line followed by ASCII art and a `Lucee Version: ` line. Any non-empty version output means the CLI is wired up correctly. + You should see a `Wheels Version: ` line followed by ASCII art. A `Lucee Version: ` line may also appear once Lucee Express has been downloaded (typically on first `wheels start`). Any non-empty version output means the CLI is wired up correctly. diff --git a/web/sites/guides/src/content/docs/v4-0-0-snapshot/start-here/tutorial/02-first-model.mdx b/web/sites/guides/src/content/docs/v4-0-0-snapshot/start-here/tutorial/02-first-model.mdx index adae3896d..304f429c1 100644 --- a/web/sites/guides/src/content/docs/v4-0-0-snapshot/start-here/tutorial/02-first-model.mdx +++ b/web/sites/guides/src/content/docs/v4-0-0-snapshot/start-here/tutorial/02-first-model.mdx @@ -67,9 +67,9 @@ At the end of Part 1 you had a running `blog` app with a `/hello` route. There's wheels generate model Post title:string body:text ``` - That creates `app/models/Post.cfc` (a near-empty `component extends="Model"`) and a migration file under `app/migrator/migrations/` with a current timestamp. + That creates `app/models/Post.cfc` and a migration file under `app/migrator/migrations/` with a current timestamp. The generated model is short but not empty — it ships with `validatesPresenceOf("title,body")` already populated for the two columns you passed in. -2. Replace the contents of `app/models/Post.cfc` with the version below — it adds the `status` enum we'll use to filter posts: +2. Replace the contents of `app/models/Post.cfc` with the version below — we drop the auto-generated validations for now (Part 4 brings them back) and add the `status` enum we'll use to filter posts: ```cfm {test:compile} component extends="Model" { diff --git a/web/sites/guides/src/content/docs/v4-0-0-snapshot/start-here/tutorial/03-crud-scaffold.mdx b/web/sites/guides/src/content/docs/v4-0-0-snapshot/start-here/tutorial/03-crud-scaffold.mdx index 4557c721a..30b6968fb 100644 --- a/web/sites/guides/src/content/docs/v4-0-0-snapshot/start-here/tutorial/03-crud-scaffold.mdx +++ b/web/sites/guides/src/content/docs/v4-0-0-snapshot/start-here/tutorial/03-crud-scaffold.mdx @@ -75,10 +75,10 @@ Route model binding kicks in on the actions that take a key. For `show`, `edit`, Drop the hand-written controller and views. The model, migration, seed file, and the `resources("posts")` route stay. ```bash title="your shell" -wheels destroy Posts controller +wheels destroy Posts controller --force ``` -The argument order is ` [type]` — `Posts controller`, not `controller Posts`. If you'd rather skip the CLI and remove the files yourself: +The argument order is ` [type]` — `Posts controller`, not `controller Posts`. The `--force` flag skips the interactive confirmation; without it, `destroy` prints `Use --force to confirm deletion.` and exits without touching anything. If you'd rather skip the CLI and remove the files yourself: ```bash title="your shell" rm app/controllers/Posts.cfc @@ -96,7 +96,9 @@ wheels generate scaffold Post title:string body:text status:enum ``` ### The controller @@ -165,18 +167,10 @@ The `new` and `edit` views both render the same form. Put the shared markup in a #errorMessagesFor("post")# #startFormTag(action=IsNumeric(post.id ?: "") ? "update" : "create", key=post.id ?: "")# - - - - + #textField(objectName="post", property="title", label="Title")# + #textArea(objectName="post", property="body", label="Body")# + #select(objectName="post", property="status", options="draft,published,archived", label="Status")# + #dateField(objectName="post", property="publishedAt", label="Published at")# #endFormTag()# @@ -189,7 +183,7 @@ Notes: - Partial filenames start with `_`. You reference them as `"form"` (no underscore, no extension) when including. - `errorMessagesFor("post")` renders a `
` with any validation errors on the `post` object. When there are none, it renders nothing. - `startFormTag` picks the right HTTP method and action URL based on whether `post.id` exists. A new `Post` has no id, so the form posts to `create`; an existing one PATCHes to `update`. -- `textField`, `textArea`, `select`, `dateField` are object-bound helpers — `objectName="post"` plus `property="title"` becomes `name="post[title]"` with the current value pre-filled. +- `textField`, `textArea`, `select`, `dateField` are object-bound helpers — `objectName="post"` plus `property="title"` becomes `name="post[title]"` with the current value pre-filled. Each helper emits its own `