Skip to content

Instantly share code, notes, and snippets.

@noahlange
Created October 8, 2015 15:46
Show Gist options
  • Save noahlange/d69619330e4cc72f1835 to your computer and use it in GitHub Desktop.
Save noahlange/d69619330e4cc72f1835 to your computer and use it in GitHub Desktop.
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