Getting undefined method time_select

Is this a rails version issue? Any suggestions for alternative?

ActionView::TemplateError (undefined method `time_select’ for
#<#Class:0xb790c54c:0xb790c524>) on line #14 of app/views/admin/
_taskform.rhtml:
11:


12:


13: Start:
14: <%= time_select(‘task’, ‘start_at’) %>
15:


16:


17: End:

Thanks.

Hi Stephen,

[email protected] wrote:

ActionView::TemplateError (undefined method `time_select’ for
14: <%= time_select(‘task’, ‘start_at’) %>

How is the start_at field in your tasks table defined?

Bill

Hi Bill -

create_table :tasks do |t|
  t.column "room_id", :integer
  t.column "work_on", :date
  t.column "start_at", :time
  t.column "end_at", :time
  t.column "desc", :string
  t.column "needed", :integer

This works on my local machine, when I move it out to RailsPlayground
I am getting this error.

-Stehen.

Thank you Bill.

On Mar 22, 2007, at 11:43 AM, [email protected] wrote:

This works on my local machine, when I move it out to RailsPlayground

14: <%= time_select(‘task’, ‘start_at’) %>

How is the start_at field in your tasks table defined?

Bill

Just a caution about a column named “desc”. Since that matches an
SQL keyword (as in “select * from tasks order by start_at DESC”), you
may run into trouble later if there’s ever a time where the column
name isn’t properly quoted.

-Rob

Rob B. http://agileconsultingllc.com
[email protected]

Hi Stephen,

[email protected] wrote:

 t.column "start_at", :time

This works on my local machine, when I move it
out to RailsPlayground I am getting this error.

I’d recommend you put together a very, very minimal sandbox app and try
that
on RailsPlayground. By minimal I mean, for example, take out everything
in
the table except start_at. Have one controller with two methods, one to
display the view for entry of the date, and one to save the result to
the
database. Have two views, one that allows the entry of that field, if
that’s what your app allows and the other that displays the value that
got
saved or an appropriate error message. If the problem is still
demonstrable, then document the config of your local machine including
gem
list, plugins, versions of everything, and submit a ticket to your
support
team. In my experience, you definitely need to have something the
support
team can work with to get them engaged.

Best of luck,
Bill