Rails set db table values to nil
I have huge db, and in one table i want to set somefield to nil, how can i do this? When i do like that:
@act = Article.all @act.each do |aaa| aaa.name = nil end
But this loads system, how to do this in more faster and better way?
Just do it like this:
Article.update_all(:name => nil)
This will go directly to the database, without loading the objects.