Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Use block params style {{#each}} #2980

Merged
merged 1 commit into from
Apr 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/ember-data/lib/system/model/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ import {

```handlebars
<label>Username: {{input value=username}} </label>
{{#each error in model.errors.username}}
{{#each model.errors.username as |error|}}
<div class="error">
{{error.message}}
</div>
{{/each}}

<label>Email: {{input value=email}} </label>
{{#each error in model.errors.email}}
{{#each model.errors.email as |error|}}
<div class="error">
{{error.message}}
</div>
Expand All @@ -75,7 +75,7 @@ import {
object to get an array of all the error strings.

```handlebars
{{#each message in model.errors.messages}}
{{#each model.errors.messages as |message|}}
<div class="error">
{{message}}
</div>
Expand Down Expand Up @@ -156,7 +156,7 @@ export default Ember.Object.extend(Ember.Enumerable, Ember.Evented, {
record. This is useful for displaying all errors to the user.

```handlebars
{{#each message in model.errors.messages}}
{{#each model.errors.messages as |message|}}
<div class="error">
{{message}}
</div>
Expand Down
6 changes: 3 additions & 3 deletions packages/ember-data/lib/system/model/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,13 +367,13 @@ var Model = Ember.Object.extend(Ember.Evented, {

```handlebars
<label>Username: {{input value=username}} </label>
{{#each error in model.errors.username}}
{{#each model.errors.username as |error|}}
<div class="error">
{{error.message}}
</div>
{{/each}}
<label>Email: {{input value=email}} </label>
{{#each error in model.errors.email}}
{{#each model.errors.email as |error|}}
<div class="error">
{{error.message}}
</div>
Expand All @@ -385,7 +385,7 @@ var Model = Ember.Object.extend(Ember.Evented, {
object to get an array of all the error strings.

```handlebars
{{#each message in model.errors.messages}}
{{#each model.errors.messages as |message|}}
<div class="error">
{{message}}
</div>
Expand Down