Created
May 6, 2019 10:59
-
-
Save MittalPatel-BTC/a956004023c73287154820bdf5352657 to your computer and use it in GitHub Desktop.
Rails 6 new method touch_all
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rails 6 | |
> User.count | |
SELECT COUNT(*) FROM "users" | |
=> 3 | |
> User.all.touch_all | |
UPDATE "users" SET "updated_at" = ? [["updated_at", "2019-04-20 16:10:40.490507"]] | |
=> 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment