Advertisement
Guest User

Novo Usuario

a guest
Jan 23rd, 2015
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.30 KB | None | 0 0
  1.     public static Result novoUsuario(){
  2.         Form<Usuario> form = Form.form(Usuario.class).bindFromRequest();
  3.           if (form.hasErrors()) {
  4.             return badRequest(formNovoUsuario.render(form));
  5.           }
  6.           Usuario usuario = form.get();
  7.           usuario.save();
  8.           return redirect(routes.Application.index());
  9.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement