Skip to content

Instantly share code, notes, and snippets.

@enriclluelles
Created May 19, 2012 15:55
Show Gist options
  • Select an option

  • Save enriclluelles/2731307 to your computer and use it in GitHub Desktop.

Select an option

Save enriclluelles/2731307 to your computer and use it in GitHub Desktop.
Nested routes backbone example
class Product extends Backbone.Model
initialize: ->
@components = new App.Collections.Components(@components || [])
@components.url = "#{@url()}/components"
url: ->
'/products/' + @id
#exporting
App.Models.Product = Product
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment