-
Notifications
You must be signed in to change notification settings - Fork 47
/
index.hbs
33 lines (33 loc) · 1.04 KB
/
index.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<div class="row">
<div class="col m6 s12">
<h4>API actions on an individual resource</h4>
{{#each content as |fruit|}}
<p class='fruit-thing' {{bind-attr id=fruit.name}}>
<button class='btn ripen-instance-button' {{action 'ripenFruit' fruit}}>Ripen</button>
{{fruit.name}} (id = {{fruit.id}})
- calls <code>fruit.ripen()</code>
</p>
{{/each}}
<h4>API action on a collection of resources</h4>
<p class='all-fruit'>
{{content.constructor.modelName}}
<button class='btn ripen-type-button' {{action 'ripenAllFruit' content.firstObject}}>Ripen All</button> - calls <code>fruit.ripenAll()</code>
</p>
</div>
<div class="col m6 s12">
<h4>Outgoing API Requests:</h4>
<ul>
{{#each requests as |req|}}
<li> <code>{{req.url}}</code> </li>
{{/each}}
</ul>
</div>
</div>
<div class="row">
<div class="col s12">
<b>app/models/fruit.js</b>
{{code-snippet name='fruit-model.js'}}
<b>app/controllers/index.js</b>
{{code-snippet name='controller.js'}}
</div>
</div>