Using sinatra, how do I construct a proper DateTime value from 3 separate input boxes?
How do I take a numeric month, day and year from three separate text inputs and parse a proper value for my DateTime field开发者_如何转开发 in the db?
date = Date.civil(params[:year].to_i, params[:month].to_i, params[:day].to_i)
精彩评论