aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/define_callbacks.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-09-28 03:38:55 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-09-28 04:14:15 +0900
commite5190acacd1088211cfe6f128b782af216aa6570 (patch)
treebc4ef154a3f3dc42e6e0e0166c7d37e6cf884e6d /activerecord/lib/active_record/define_callbacks.rb
parentdc47bb5091b058af45081499f67342c3890d6564 (diff)
downloadrails-e5190acacd1088211cfe6f128b782af216aa6570.tar.gz
rails-e5190acacd1088211cfe6f128b782af216aa6570.tar.bz2
rails-e5190acacd1088211cfe6f128b782af216aa6570.zip
Make `update_counters` preparable
Before: ``` Topic Update All (0.4ms) UPDATE `topics` SET `topics`.`replies_count` = COALESCE(`topics`.`replies_count`, 0) + 1, `topics`.`updated_at` = '2018-09-27 18:34:05.068774' WHERE `topics`.`id` = ? [["id", 7]] ``` After: ``` Topic Update All (0.4ms) UPDATE `topics` SET `topics`.`replies_count` = COALESCE(`topics`.`replies_count`, 0) + ?, `topics`.`updated_at` = ? WHERE `topics`.`id` = ? [["replies_count", 1], ["updated_at", 2018-09-27 18:55:05 UTC], ["id", 7]] ```
Diffstat (limited to 'activerecord/lib/active_record/define_callbacks.rb')
0 files changed, 0 insertions, 0 deletions