ActiveResource and dates

Hi
I'm having difficulty using form date_select on a date attribute when
using ActiveResource.

The xml attribute looks like:

<date type="date">yyyy-mm-dd</date>

And the form is simple form_for scaffolding:

form_for :model do |f|

f.date_select :date

end

When I run this I get the following error:

undefined method `day' for "2006-05-09":String

I think I have to do something with the attribute type but I'm unsure
exactly what and where.

Thx

Jason

Solution

@model.date = Date.parse(@model.date)

in the client controller.