I have the following routes:
Redb.Router.map ()->
@resource "forms", ->
@route "new"
@route "show", path: "/:form_id"
I have associated templates and controllers.
Using links generated by link-to
helper, everything works fine, but, for example when I am #/forms/1
and hit back to go to #/forms
it gives these errors:
Assertion failed: The initializer 'store' has already been registered
Assertion failed: The initializer 'dataAdapter' has already been registered
Assertion failed: The initializer 'injectStore' has already been registered
And then, when I hit forward button I get:
Error while loading route: TypeError: Cannot set property 'store' of undefined
at DS.Store.Ember.Object.extend.modelFor (http://localhost:3000/assets/ember-data.js?body=1:2726:19)
at DS.Store.Ember.Object.extend.find (http://localhost:3000/assets/ember-data.js?body=1:1730:17)
at Ember.Route.Ember.Object.extend.findModel (http://localhost:3000/assets/ember.js?body=1:34817:23)
at Ember.Route.Ember.Object.extend.model (http://localhost:3000/assets/ember.js?body=1:34806:17)
at getModel (http://localhost:3000/assets/ember.js?body=1:33269:45)
at model (http://localhost:3000/assets/ember.js?body=1:33197:17)
at invokeCallback (http://localhost:3000/assets/ember.js?body=1:9428:19)
at publish (http://localhost:3000/assets/ember.js?body=1:9098:9)
at Promise.publishFulfillment (http://localhost:3000/assets/ember.js?body=1:9518:7)
at Object.DeferredActionQueues.flush (http://localhost:3000/assets/ember.js?body=1:5651:24)
Error while loading route: TypeError: Cannot set property 'store' of undefined
at DS.Store.Ember.Object.extend.modelFor (http://localhost:3000/assets/ember-data.js?body=1:2726:19)
at DS.Store.Ember.Object.extend.find (http://localhost:3000/assets/ember-data.js?body=1:1730:17)
at Ember.Route.Ember.Object.extend.findModel (http://localhost:3000/assets/ember.js?body=1:34817:23)
at Ember.Route.Ember.Object.extend.model (http://localhost:3000/assets/ember.js?body=1:34806:17)
at getModel (http://localhost:3000/assets/ember.js?body=1:33269:45)
at model (http://localhost:3000/assets/ember.js?body=1:33197:17)
at invokeCallback (http://localhost:3000/assets/ember.js?body=1:9428:19)
at publish (http://localhost:3000/assets/ember.js?body=1:9098:9)
at Promise.publishFulfillment (http://localhost:3000/assets/ember.js?body=1:9518:7)
I am new to Ember and I am trying to learn it. Can anyone help me with this?