Tuesday, February 18, 2014

Form Helpers — Ruby on Rails Guides

Form Helpers — Ruby on Rails Guides: "The above inputs would result in params[:start_date] being a hash with keys :year, :month, :day. To get an actual Time or Date object you would have to extract these values and pass them to the appropriate constructor, for example

Date.civil(params[:start_date][:year].to_i, params[:start_date][:month].to_i, params[:start_date][:day].to_i)
"



'via Blog this'

No comments:

Post a Comment