stephenacross-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Mar-22 14:26 UTC
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: </p> 12: <p> 13: <label for="start_at">Start:</label> 14: <%= time_select(''task'', ''start_at'') %> 15: </p> 16: <p> 17: <label for="end_at">End:</label> Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Stephen, stephenacross-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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 --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
stephenacross-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Mar-22 15:43 UTC
Re: Getting undefined method time_select
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. On Mar 22, 10:40 am, "Bill Walton" <bill.wal...-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote:> Hi Stephen, > > stephenacr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Stephen, stephenacross-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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 --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
stephenacross-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Mar-22 16:40 UTC
Re: Getting undefined method time_select
Thank you Bill. On Mar 22, 12:33 pm, "Bill Walton" <bill.wal...-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote:> Hi Stephen, > > stephenacr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 22, 2007, at 11:43 AM, stephenacross-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> 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. > > > On Mar 22, 10:40 am, "Bill Walton" <bill.wal...-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote: >> Hi Stephen, >> >> stephenacr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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? >> >> BillJust 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 Biedenharn http://agileconsultingllc.com Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---