Sha256: a04d754f48699647cadd0112a3a81ec6b0f707a164170ddb94a91cfea267f5b8
Contents?: true
Size: 577 Bytes
Versions: 2
Compression:
Stored size: 577 Bytes
Contents
import javax.servlet.http.HttpServlet import com.google.appengine.ext.duby.db.Model class Post < Model def initialize; end property title, String property body, Text end class DubyApp < HttpServlet def_edb(list, 'com/ribrdb/list.dhtml') def doGet(request, response) returns :void @posts = Post.all.run response.getWriter.write(list) end def doPost(request, response) post = Post.new post.title = request.getParameter('title') post.body = Text.new(request.getParameter('body')) post.save doGet(request, response) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
duby-0.0.2-java | examples/appengine/src/com/ribrdb/DubyApp.duby |
duby-0.0.1 | examples/appengine/src/com/ribrdb/DubyApp.duby |