Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement