On 28 May 2008, at 22:38, NK wrote:
>
> Hey all,
>
> I''ve been profiling my app and noticed that Date._parse is eating
up
> a lot of time in some of my requests.
>
> I''m attempting to pull the date from MySQL w/o
ActiveRecord''s
> typecasting, but just can''t seem to be able to do it. I tried
> <attr_name>_before_type_casting &
> read_attribute_before_type_casting(attr_name) and all I get back is a
> Date object. What I want to get back is a string rep of the date as
> the db stored it.
>
> Any clues as to why typecasting is happening anyway?
>
because usually a date object is more useful (rails 2.1 has some code
to make that a lot faster).
Can you use the attributes_before_type_cast hash ?
Fred> I''m using rails 2.0.2 & MySQL 5.0.51a-3ubuntu5.
>
> Thanks.
>
>
> -Nash
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---