Hello,

    I am trying to create a Date instance from user input, but I keep
getting the ArgumentError invalid date. Here's the simplified version:

View:

<%= form_tag "/" do %>
<%= number_field_tag(:month) %>
<%= number_field_tag(:day) %>
<%= number_field_tag(:year) %>
<%= submit_tag "Date" %>
<%= end %>

Controller:

Date.new(params[:year].to_i, params[:month].to_i, params[:day].to_i)

I find this odd because I haven't even inputted any variables in the
view yet the date is invalid?

Thanks

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to