Solution
@model.date = Date.parse(@model.date)
in the client controller.
On 14 May, 12:12, jason <j...-DBciWbShXhpAfugRpC6u6w@public.gmane.org>
wrote:> 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
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---