Created
June 10, 2011 03:15
-
-
Save scottmessinger/1018177 to your computer and use it in GitHub Desktop.
Model has no method '_configure'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Relevant Code::: | |
var Course = Backbone.Model.extend({ | |
url : function(){ | |
var base = 'courses' | |
if (this.isNew()) return base; | |
return base + (base.charAt(base.length-1) == '/'?'' : '/') + this.id; | |
} | |
}) | |
App.Controllers.Courses = Backbone.Controller.extend({ | |
routes : { | |
"courses/:id" : "show", | |
"" : "index" | |
//"new" : "newDoc" | |
}, | |
show : function(id){ | |
var course = new Course({ id : id}) | |
course.fetch({ | |
success: function(){ | |
App.Views.Show({ model : course}); | |
} | |
}) | |
} | |
}); | |
ERROR:::: | |
Uncaught TypeError: Object #<Object> has no method '_configure' and this points to line 9 in this gist. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solved. I need to add new