I''ve been banging my head against this wall for several hours, and it
hurts now so I''ll stop and ask someone.
In one of my forms I had been using a statement to extract the current
year for use with some form field calculations.
<% currentyear = DateTime.now.year %>
And then further down several date_selects like the following,
<%= date_select "member", "last_medical_date", :id
=>
"member_last_medical_date", :order => [:year, :month, :day],
:start_year
=> (currentyear - 5), :end_year => currentyear %>
<label for="member_last_medical_date">Date of Last Medical
Exam
(YYYY/MM/DD)</label><br>
The first statement subsequently stopped working! Now with that
statement I get a "ArgumentError" where the DateTime.now.year has
raised
an "invalid date" error.
If I use,
<% currentyear = Time.now.year %>
instead, then I can get past THAT error, but then the date_select
statement raises the "invalid date" error message.
Out of desperation I''ve even uninstalled Ruby and Rails, and
reinstalled
it all again. This is all latest version stuff... Ruby v1.8.4, Rails
v1.1.2, RadRails v0.6.1, MySQL v5.0.11 all running on Win2kSP4.
Any ideas?
Scott
--
Posted via http://www.ruby-forum.com/.