Skip to content

Instantly share code, notes, and snippets.

@jamespeerless
Created April 7, 2014 19:11
Show Gist options
  • Save jamespeerless/10032666 to your computer and use it in GitHub Desktop.
Save jamespeerless/10032666 to your computer and use it in GitHub Desktop.
# new view with form to create entity
entity = App.request "new:entity"
@listenTo entity, "created", =>
App.vent.trigger "entity:created", entity
entity.save attr1:attr1val
# app module for entity
App.vent.on "entity:created", (entity) ->
App.navigate "show:entity"
# instantiate controller for the view to show confirmation number, etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment