File tree 2 files changed +3
-18
lines changed
2 files changed +3
-18
lines changed Original file line number Diff line number Diff line change 1
- var postsData = [
2
- {
3
- title : 'Introducing Telescope' ,
4
- url : 'http://sachagreif.com/introducing-telescope/'
5
- } ,
6
- {
7
- title : 'Meteor' ,
8
- url : 'http://meteor.com'
9
- } ,
10
- {
11
- title : 'The Meteor Book' ,
12
- url : 'http://themeteorbook.com'
13
- }
14
- ] ;
15
1
Template . postsList . helpers ( {
16
- posts : postsData
2
+ posts : function ( ) {
3
+ return Posts . find ( ) ;
4
+ }
17
5
} ) ;
Original file line number Diff line number Diff line change 1
1
if ( Posts . find ( ) . count ( ) === 0 ) {
2
2
Posts . insert ( {
3
3
title : 'Introducing Telescope' ,
4
- author : 'Sacha Greif' ,
5
4
url : 'http://sachagreif.com/introducing-telescope/'
6
5
} ) ;
7
6
8
7
Posts . insert ( {
9
8
title : 'Meteor' ,
10
- author : 'Tom Coleman' ,
11
9
url : 'http://meteor.com'
12
10
} ) ;
13
11
14
12
Posts . insert ( {
15
13
title : 'The Meteor Book' ,
16
- author : 'Tom Coleman' ,
17
14
url : 'http://themeteorbook.com'
18
15
} ) ;
19
16
}
You can’t perform that action at this time.
0 commit comments