Skip to content

Instantly share code, notes, and snippets.

@jkarsrud
Created June 22, 2013 23:39
Show Gist options
  • Save jkarsrud/5843127 to your computer and use it in GitHub Desktop.
Save jkarsrud/5843127 to your computer and use it in GitHub Desktop.
App.ProjectsController = Ember.ArrayController.extend({
cancel: function() {
// Do something
}
});
App.ProjectsNewController = Ember.ArrayController.extend({
create: function() {
// Do something
}
});
<form {{ action 'create' on='submit'}} class="form-horizontal"> <!-- this triggers create on the ProjectsNewController -->
<!-- Fields here -->
<button type="submit" class="btn btn-success">Add task</button>
<a {{action 'cancel'}} class="btn">Cancel</a> <!-- Can this trigger the cancel on ProjectsController? -->
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment