Thanks a lot for the help. seems the Rails group wins as they made a 
strong point about using the migration to take care of this task. Will 
play with code there and see what happens.

Once again thanks.

Q

Florian Gilcher wrote:
> On Jan 6, 2010, at 4:51 PM, Quee WM wrote:
> 
>> 
>> Q2: if the aforementioned idea is not a good way then what will be the
>> best way to update the existing records as any code i will write will
>> only be used to update the table once.
> 
> Sure. If you use the "script/runner"-Script instead of the plain Ruby 
> interpreter, your script will run in the fully loaded application 
> environment. For one-shot scripts that are not exactly migrations, this 
> is an acceptable way to do this. So:
> 
>   script/runner -e development path/to/my/script.rb
> 
> Regards,
> Florian

-- 
Posted via http://www.ruby-forum.com/.