Permalink
Browse files

Added idAttribute as resource_uri

  • Loading branch information...
1 parent 437c99b commit 8e394c18deccb1bbd23a4be614218c15ee380831 Brandon R. Stoner committed Jun 21, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/models.coffee
View
@@ -1,6 +1,10 @@
class TastyPieModel extends Backbone.Model
+ # TODO: Figure out how to make an ID into just an id. Not the entire URI.
+ idAttribute: 'resource_uri'
+
url: ->
- # It seems that TastyPie really likes leading slahes. This is a bad thing.
+ if @id then return @id
+
url = Backbone.Model.prototype.url.call @
if url[url.length-1] != '/'

0 comments on commit 8e394c1

Please sign in to comment.