Parent: [089dc3] (diff)

Child: [1264ab] (diff)

Download this file

app.js    60 lines (45 with data), 1.2 kB

 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
App = Ember.Application.create();
App.ApplicationAdapter = DS.LSAdapter.extend({
namespace: 'compass'
});
App.Question = DS.Model.extend({
detail : DS.attr('string')
});
App.ApplicationRoute = Ember.Route.extend({
model: function() {
this.store.push('question', {
id: 1,
detail: "Did you create software?"
});
this.store.push('question', {
id: 2,
detail: "Do you hold copyright?"
});
this.store.push('question', {
id: 3,
detail: "Have you obtained rights to code?"
});
this.store.push('question', {
id: 4,
detail: "Do you want to share source?"
});
this.store.push('question', {
id: 5,
detail: "Should any future distributions be required to use your licence choice?"
});
this.store.push('question', {
id: 6,
detail: "May users distribute their extensions and modifications on a different licence ?"
});
}
});
App.Router.map(function() {
// put your routes here
this.route('questions', { path: '/' });
});
App.QuestionsRoute = Ember.Route.extend({
model: function() {
// the model is an Array of all of the posts
return this.store.find('question');
}
});