Re: [Rails] How to: Set a datetime params-value to nil in the controller

2010-04-22 Thread Michael Pavling
On 22 April 2010 15:22, Tom Ha wrote: > ...how do I set the value 'params[:task][:enddate]' to 'nil' in the > controller? > > I tried... > >  params[:task][:enddate] = nil > > ...but that doesn't seem to "empty" the attribute 'enddate'. What am I > getting wrong? If it doesn't "empty" (whatever y

Re: [Rails] How to: Set a datetime params-value to nil in the controller

2010-04-22 Thread Colin Law
On 22 April 2010 15:22, Tom Ha wrote: > Hi there, > > Suppose I submit an object called "task" from a form with... > >  task[enddate(1i)]  ->  2011 >  task[enddate(2i)]  ->  3 >  task[enddate(3i)]  ->  1 > > ...how do I set the value 'params[:task][:enddate]' to 'nil' in the > controller? > > I tr

[Rails] How to: Set a datetime params-value to nil in the controller

2010-04-22 Thread Tom Ha
Hi there, Suppose I submit an object called "task" from a form with... task[enddate(1i)] -> 2011 task[enddate(2i)] -> 3 task[enddate(3i)] -> 1 ...how do I set the value 'params[:task][:enddate]' to 'nil' in the controller? I tried... params[:task][:enddate] = nil ...but that doe