Forum: Ruby on Rails Problem using a date helper

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
alisonrowland (Guest)
on 2005-12-01 19:39
(Received via mailing list)

I'm having trouble getting a date helper working. I was pointed to
this by Sean A., and it resides at

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:, 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

This topic is locked and can not be replied to.