Permalink
Browse files

Fixing up more ember stuff.

Apparently ember-rails is a bit out of synch. Whatever.
  • Loading branch information...
steveklabnik committed Jul 8, 2012
1 parent a12cbf7 commit 0d9a8d4726dfcbea76e757ca45f30336ad79bcd9
@@ -11,7 +11,8 @@
//= require handlebars
//= require ember-data
//= require_self
-GetAJob = Ember.Application.create();
//= require get_a_job
//= require_tree .
+GetAJob = Ember.Application.create();
+
@@ -1,4 +1,4 @@
-GetAJob.ApplicationController = Ember.ObjectController.extend({
+GetAJob.ApplicationController = Ember.ArrayController.extend({
// Implement your controller here.
});
@@ -7,9 +7,4 @@
//= require_tree ./routes
//= require_self
-var router = GetAJob.router = GetAJob.Router.create({
- location: 'hash'
-});
-
-GetAJob.initialize(router);
@@ -0,0 +1,6 @@
+GetAJob.Job = DS.Model.extend({
+ numberOne: DS.attr('number'),
+ numberTwo: DS.attr('number'),
+ answer: DS.attr('date'),
+ status: DS.attr('string'),
+});
@@ -1,15 +1,14 @@
GetAJob.Router = Ember.Router.extend({
- root: Ember.Route.extend({
- index: Ember.Route.extend({
- route: '/'
-
- // You'll likely want to connect a view here.
- // connectOutlets: function(router) {
- // router.get('applicationController').connectOutlet(App.MainView);
- // }
-
- // Layout your routes here...
+ root: Ember.State.extend({
+ index: Ember.State.extend({
+ route: '/',
+ redirectsTo: 'jobs'
+ }),
+ jobs: Ember.State.extend({
+ route: '/jobs'
+ }),
+ job: Ember.State.extend({
+ route: '/jobs/:job_id'
})
})
});
-
@@ -1,4 +1,4 @@
-GetAJob.Store = DS.Store.extend({
+GetAJob.store = DS.Store.extend({
revision: 4,
adapter: DS.RESTAdapter.create()
});

0 comments on commit 0d9a8d4

Please sign in to comment.