On May 22, 9:25 am, Herman Müller <[email protected]>
wrote:
> Thanks for all suggestions!
>
> I made a little date experiment and the normal date range of ruby 1.8.6,
> rails 2.2.2 and mysql 5.045 is between 01.01.0001 and 01.01.3000 or
> greater.
>
> The error message "argument out of range" appears only when I use the
> DHTMLCalendar plugin from
>
> ruby script/plugin installhttp://dhtml-calendar.googlecode.com/svn/trunk
>
> The first two lines of the Application-Trace
>
> vendor/plugins/svn/lib/extensions/active_record.rb:61:in `local'
> vendor/plugins/svn/lib/extensions/active_record.rb:61:in `quote'
>
> are pointing to a fault in the active_record.rb of the
> DHTMLCalendar-plugin:
>
> Line 61:  when Date then "'#{quoted_date(Time.local(value.year,
> value.month, value.day, 0, 0, 0))}'"
>         else            quote_without_date_cast(value, column)
>
> Do somebody knows a solution?

While the ruby Date class has an absolutely massive range, Time
doesn't, so the plugin shouldn't really be converting a date instance
into a instance of Time (at least not without checking if it is
possible first)

Fred

>
> Thanks in front.
>
> Regs Hermann
> --
> Posted viahttp://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