Hi everyone,
I currently have multiply record of datatime I like to update. I have no
problem doing the multiple checkbox/text field update, but when it comes to
datetime_select, I must have made some mistakes and it simple doesn''t
work.
my code is like this:
for work_time in @work_times #work_time.check_in is datetime type.
datetime_select("work_time["+work_time.id.to_s+"]",
"check_in")
above will flow out an error saying work_time(140) is not an valid instant
variable name. (assume 140 is the id of work_time)
if I use
for work_time in @work_times
datetime_select("work_time", "check_in")
then the datetime comes out, but it''s not from the AR (I like to draw
a series of record from databases and do edit). and it only shows content of
Time.now
Would anyone please tell me what is the right way to do this. Thank you very
much.
sammy
---------------------------------
雅虎免费G邮箱-中国第一绝无垃圾邮件骚扰超大邮箱
雅虎助手-搜索、杀毒、防骚扰
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails