Created
July 20, 2014 21:40
-
-
Save rmosolgo/af187927a243b815df7f to your computer and use it in GitHub Desktop.
Initialize a batman.js model with a hasMany child
This file contains hidden or 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
| class MyApp.TasksController extends MyApp.ApplicationController | |
| new: -> | |
| task = new MyApp.Task | |
| task.get('task_entries').build(item: new MyApp.Item) | |
| @set('task', task) | |
| # /tasks/new will be rendered implicitly. MyApp.TasksNewView will be used to render that template, if it is defined. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment