Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sample Spine.js Routing Controller in
class App.TicketsController extends Spine.Controller
constructor: ->
"/tickets": @index
"/tickets/:id" : (params) ->
index: ->
tickets = App.Ticket.all()
App.Ticket.trigger "tickets:index", tickets
show: (id) ->
ticket = App.Ticket.find(id)
$.publish 'ticket:switch', ticket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.