Skip to content

Instantly share code, notes, and snippets.

@smizell
Created April 26, 2012 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smizell/2502461 to your computer and use it in GitHub Desktop.
Save smizell/2502461 to your computer and use it in GitHub Desktop.
API Call
window.MobileAppCollection = Backbone.Collection.extend
url: "http://kate.murraystate.edu/api/v1/mobile_app/"
model: MobileApp
window.MobileApp = Backbone.Model.extend
urlRoot: "http://kate.murraystate.edu/api/v1/mobile_app/"
url: () ->
base = @urlRoot || (@collection && @collection.url)
if @isNew() then return base
return base + "/" + @id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment