Skip to content

Instantly share code, notes, and snippets.

@sishen
Created August 16, 2012 17:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sishen/3371899 to your computer and use it in GitHub Desktop.
Save sishen/3371899 to your computer and use it in GitHub Desktop.
Url Scoping in Spine.js
class App.Ticket extends Spine.Model
@configure 'Ticket', "id", "project_id"
@scope: ->
"projects/#{current.project_id}"
scope: ->
"projects/#{@project_id}"
@kaichen
Copy link

kaichen commented Aug 20, 2012

For nested resources?

@00defeat
Copy link

How are you using this scoped URL @sishen?

@sishen
Copy link
Author

sishen commented Mar 30, 2013

@benhainez Sorry i didn't get the notification on your comment. Basically you can use my patched version of SpineJS http://github.com/sishen/spine. There is a PR for this feature and I think it will be applied to the upstream soon. spine/spine#410

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment