Skip to content

Commit

Permalink
Modified URL algorithm a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon R. Stoner committed Jun 21, 2012
1 parent 0c4ee37 commit c8b9dae
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/models.coffee
Expand Up @@ -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.
Expand Down

0 comments on commit c8b9dae

Please sign in to comment.