Skip to content

Commit

Permalink
Use #let instead of deprecated #with in example (#666)
Browse files Browse the repository at this point in the history
  • Loading branch information
x-m-el authored Oct 12, 2024
1 parent 4528b9c commit 44e261f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ First, create a new `Changeset` using the `changeset` helper or through JavaScri

```hbs
{{! application/template.hbs}}
{{#with (changeset model this.validate) as |changesetObj|}}
{{#let (changeset model this.validate) as |changesetObj|}}
<DummyForm
@changeset={{changesetObj}}
@submit={{this.submit}}
@rollback={{this.rollback}} />
{{/with}}
{{/let}}
```

```js
Expand Down Expand Up @@ -190,9 +190,9 @@ let changeset = Changeset(model, validatorFn, validationMap, { skipValidate: tru
```

```hbs
{{#with (changeset model this.validate skipValidate=true) as |changesetObj|}}
{{#let (changeset model this.validate skipValidate=true) as |changesetObj|}}
...
{{/with}}
{{/let}}
```

Be sure to call `validate()` on the `changeset` before saving or committing changes.
Expand Down

0 comments on commit 44e261f

Please sign in to comment.