oops, have it use the view instead of the model
This commit is contained in:
parent
db584858cf
commit
1b91906250
|
@ -46,6 +46,7 @@ describe 'backbone-generator' do
|
|||
File.file?(template = 'app/views/section/models.jst').should be_true
|
||||
|
||||
File.read(view).should match(/SectionModelsView/)
|
||||
File.read(view).should match(/SectionModelView/)
|
||||
File.read(view).should match(%r{template: JST\['section/models'\]})
|
||||
File.read(spec).should match(/SectionModelsView/)
|
||||
end
|
||||
|
|
|
@ -13,7 +13,7 @@ var <%= object_name %>sView = Backbone.View.extend({
|
|||
$(this.el).html(this.template());
|
||||
},
|
||||
addOne: function(model) {
|
||||
var view = new <%= object_name %>({model: model});
|
||||
var view = new <%= object_name %>View({model: model});
|
||||
this.$('.list').append(view.render().el);
|
||||
},
|
||||
addAll: function() {
|
||||
|
|
Loading…
Reference in New Issue