Hi,
I''m having trouble getting a date helper working. I was pointed to
this by Sean Allen, and it resides at
http://theredheadedstepchild.net/articles/2005/08/04/datehelper-fixes
It''s meant to fix the bug in Rails which doesn''t allow
datetime_select
to properly discard the year.
So, I''m trying to use the helper''s time_select function.
date_helper.rb is in my helpers directory. In my controller, it''s
included with "helper :date"
In my view, I have the code
<%= time_select ''train'', ''stonybrook_at''
%>
If I use the helper file as-is, when I try to load my view, I get the
error "Uninitialized constant DateHelper". If I comment out the lines
"module ActionView" and "module Helpers", I get past that
error, but
then I''m stuck with another error:
ArgumentError in Admin/trains#new
Showing app/views/admin/trains/_form.rhtml where line #19 raised:
wrong number of arguments (3 for 0)
Extracted source (around line #19):
16: <tr>
17: <td>
18: <p><label for="train_stonybrook_at">Stony Brook
at</label><br/>
19: <%= time_select "train", "stonybrook_at"%>
20: </p>
21: </td>
22: <td>
The line it references in date_helper.rb looks like this:
InstanceTag.new(object, method, self).to_datetime_select_tag(options)
What am I doing wrong?
BTW, I''m on OS X 1.4.3, using Locomotive with the Rails 0.14.3 Max
bundle.
Thanks,
Alison