Skip to content

Instantly share code, notes, and snippets.

@kurko
Last active December 21, 2015 12:38
Show Gist options
  • Save kurko/6306697 to your computer and use it in GitHub Desktop.
Save kurko/6306697 to your computer and use it in GitHub Desktop.
Generating content for ArrayController. Returns: Uncaught TypeError: Object function () { return App.Article.createRecord({title: "my article"}); } has no method 'addArrayObserver'
App.IndexController = Ember.ArrayController.extend({
software_index: function() {
// this will use .find() later
return Ember.A([App.Text.find()]);
}.property()
});
App.PostsIndexController = Ember.ArrayController.extend();
<div class="content">
<h1>Software</h1>
{{render "posts/index" software_index}}
</div>
{{#each controller}}
<h2><a href="#">{{title}}</a></h2>
{{/each}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment