codebrew / backbone-rails

Easily use backbone.js with rails 3.1
MIT License
1.62k stars 255 forks source link

In Firebug console: TypeError: this.options.posts is undefined #58

Closed mulderp closed 12 years ago

mulderp commented 12 years ago

Running the simple blog sample application, I am trying to understand how to make Backbone.js work for me. When trying this in the Firebug console, I get the error as stated in the title:

posts = Blog.Models.PostModel({'name': 'test'})

postView = new Blog.Views.Posts.IndexView({model: posts})

TypeError: this.options.posts is undefined [Bei diesem Fehler anhalten] return this.options.posts.bind('reset', this.addAll);

So, my issue would be where is options coming from, and what value would be expected?

mulderp commented 12 years ago

postview = new Blog.Views.Posts.IndexView({posts: whatever})

works