Re: date_select oddness

jonathan
Tue, 29 Nov 2005 19:03:37 -0000

openbsdpl wrote:
> Hello,
> I have a problem when with this tag in view:
>    <%= date_select :customdate, nil %>
>
> In the controller there is:
>    d = Date.new
>    d = params[:customdate]
>    render_text "#{d.inspect}"
>
> The problem is the :customdate doesnt get transformed
> into Date, instead I get this:
>    {"(3i)"=>"29",
"(1i)"=>"2005", "(2i)"=>"11"}
>
> Any ideas how to solve it?
>
> Best regards,
> Tom

Shouldn''t it be:

d = Date.new( params[:customdate] )

??


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