Rename Whisper.View#attributes
Avoid colliding with Backbone.View attributes, which is a list of attrs to set on the html element for a view.
This commit is contained in:
parent
dc1b09f59d
commit
1321a90667
6 changed files with 11 additions and 11 deletions
|
@ -22,11 +22,11 @@
|
|||
Backbone.View.apply(this, arguments);
|
||||
Mustache.parse(_.result(this, 'template'));
|
||||
},
|
||||
attributes: function() {
|
||||
render_attributes: function() {
|
||||
return _.result(this.model, 'attributes', {});
|
||||
},
|
||||
render: function() {
|
||||
var attrs = _.result(this, 'attributes', {});
|
||||
var attrs = _.result(this, 'render_attributes', {});
|
||||
var template = _.result(this, 'template', '');
|
||||
this.$el.html(Mustache.render(template, attrs));
|
||||
return this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue