Created
October 8, 2015 15:46
-
-
Save noahlange/d69619330e4cc72f1835 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
import { Forms, Controller } from 'overland'; | |
class MyCtrl extends Controller { | |
*form (next) { | |
const Post = this.models.get('post'); | |
const form = new Forms.ModelForm(Post); | |
const data = yield Post.findOne({ id: 1 }); | |
const html = yield form.render(data) | |
this.body = yield this.render({ form: html }); | |
} | |
} | |
export default MyCtrl; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment