DEBUG: ------------------------------- ember.js:3916
DEBUG: Ember : 1.7.0-beta.1+canary.3d383376 ember.js:3916
DEBUG: Ember Data : 1.0.0-beta.7.f87cba88 ember.js:3916
DEBUG: Handlebars : 1.1.2 ember.js:3916
DEBUG: jQuery : 1.10.2 ember.js:3916
DEBUG: -------------------------------
I'm starting a very simple application and trying out ember-data. I'm not sure if this is a bug or something I'm doing wrong. In my route and model function I have @store.find('post', 1)
which works great. But if I try changing this to find all my records with @store.find('post')
I get this error Error while loading route: posts No model was found for 'super' Error: No model was found for 'super'
I don't know what super is and why would I need a super model? The error is coming from the function called modelFor:
on line 9797 in ember.data.js. If I place a console.log(key)
in this function I get the following output post
, App.Post
, super
.
Below is the code I've got currently, its very basic:
App.Post
App.Post = DS.Model.extend
title: DS.attr('string')
description: DS.attr('string')
Router
App.Router.map () ->
@resource 'posts'
Index Route
App.IndexRoute = Ember.Route.extend
beforeModel: () ->
@transitionTo 'posts',
Post Route
App.PostsRoute = Ember.Route.extend
model: () ->
@store.find('post')
Adapter/Serializer
App.ApplicationAdapter = DS.ActiveModelAdapter
App.ApplicationSerializer = DS.ActiveModelSerializer
RESTAdapter
DS.RESTAdapter.reopen
namespace: 'api/v1'
Hopefully someone can help me spot the error or bug.
find('post')
, will you show your adapter/serializer as well – Kingpin2kApp.ApplicationAdapter = DS.ActiveModelAdapter
andApp.ApplicationSerializer = DS.ActiveModelSerializer
– PeterPost Route
. Is that what your asking for? – Peter