I added a new column to my table but I forgot to add the :default option. Now I want to populate that column on every single row.
Is there a way to do with using the con
Try this:
Foo.update_all(some_column: "bar")
This will generate SQL query to database:
UPDATE "foos" SET "some_column" = "bar";