File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,11 @@ App.Message.FIXTURES = [
3838var store ;
3939
4040App . IndexRoute = Ember . Route . extend ( {
41- "model " : function ( ) {
41+ "init " : function ( ) {
4242 store = this . store ;
43- return store . findAll ( "message" ) ;
43+ } ,
44+ "model" : function ( ) {
45+ return store . find ( "message" ) ;
4446 }
4547} ) ;
4648
@@ -49,6 +51,7 @@ App.IndexController = Ember.ArrayController.extend({
4951 "command" : null ,
5052
5153 "actions" : {
54+
5255 "send" : function ( key ) {
5356
5457 if ( key && key != 13 ) {
@@ -75,6 +78,7 @@ App.IndexController = Ember.ArrayController.extend({
7578
7679 this . set ( "command" , null ) ;
7780 }
81+
7882 }
7983
8084} ) ;
@@ -89,6 +93,8 @@ App.IndexView = Em.View.extend({
8993
9094try {
9195
96+ var id = 1 ;
97+
9298 if ( ! WebSocket ) {
9399
94100 console . log ( "no websocket support" ) ;
@@ -109,7 +115,6 @@ try {
109115 socket . addEventListener ( "message" , function ( e ) {
110116
111117 var data = JSON . parse ( e . data ) ;
112- var id = 1 ;
113118
114119 switch ( data . message . type ) {
115120
You can’t perform that action at this time.
0 commit comments