Last active
August 29, 2015 14:06
-
-
Save rociopaez/89ad66ad97ff4ba436bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on(":id") do |id| | |
output = Output[id] | |
on post, param("output") do |params| | |
date = Date.new(params["date_year"].to_i, params["date_month"].to_i, params["date_day"].to_i) | |
output.update(date: date, scale: params["scale"], duration: params["duration"]) | |
res.redirect("/outputs") | |
end | |
on get do | |
render("outputs/edit", title: "Edit Output", output: output) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment