Last active
December 11, 2015 04:48
-
-
Save davydotcom/4547596 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cointrace.GlAccountsEditView = Ember.View.extend | |
templateName: 'gl_accounts_edit' | |
didInsertElement: -> | |
$('#modal').modal("show") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cointrace.GlAccountsRoute = Ember.Route.extend | |
setupController: (controller) -> | |
controller.set 'content', Cointrace.Gl.Account.find() | |
events: | |
editAccount: (account) -> | |
controller = this.controllerFor 'glAccountsEdit' | |
controller.set "content", (account || Cointrace.Gl.Account.createRecord()) | |
this.render 'gl_accounts_edit', | |
into: 'application' | |
outlet: 'modal' | |
controller: controller |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment