on post do talk = Talk.create( title: req.POST["title"], author: req.POST["author"], description: req.POST["description"], ) res.redirect("/charlas/#{talk.id}", 302) end end end
on post do talk = Talk.create( title: req.POST["title"], author: req.POST["author"], description: req.POST["description"], ) res.redirect("/charlas/#{talk.id}", 302) end end on get, "charlas/:id" do |id| talk = Talk[id] res.write(view("talk", talk: talk)) end end