Permalink
Browse files

Modified URL algorithm a bit.

  • Loading branch information...
1 parent 0c4ee37 commit c8b9dae3d0b230929892dfa1bc0a88753a1b9a79 Brandon R. Stoner committed Jun 21, 2012
Showing with 2 additions and 7 deletions.
  1. +2 −7 src/models.coffee
View
@@ -3,14 +3,9 @@ class TastyPieModel extends Backbone.Model
idAttribute: 'resource_uri'
url: ->
- if @id then return @id
+ if @id? then return @id
- url = Backbone.Model.prototype.url.call @
-
- if url[url.length-1] != '/'
- url = url + '/'
-
- url
+ Backbone.Model.prototype.url.call @
@factory: (endpoint, bone) ->
# Creates a nested class which accesses the given endpoint. I know. It's weird.

0 comments on commit c8b9dae

Please sign in to comment.