From d449f782a3fcb84960a77e2925baeb9d7f6a2a6e Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 1 Feb 2017 10:52:15 +0800 Subject: [PATCH] Revert "FIX: Don't skip callbacks when rebaking posts." This reverts commit 06c651f8c929727d6d2ea78197b1aec81506f53f. If site settings are changed, there is a chance that the post will fail PostValidator's validations. --- app/models/post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/post.rb b/app/models/post.rb index 4670b6c0758..4667f93cfd0 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -454,7 +454,7 @@ class Post < ActiveRecord::Base new_cooked = cook(raw, topic_id: topic_id, invalidate_oneboxes: opts.fetch(:invalidate_oneboxes, false)) old_cooked = cooked - self.update!(cooked: new_cooked, baked_at: Time.new, baked_version: BAKED_VERSION) + update_columns(cooked: new_cooked, baked_at: Time.new, baked_version: BAKED_VERSION) # Extracts urls from the body TopicLink.extract_from(self)