From e72684f9dc5718299db7ff26054d615ef5676314 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Mon, 20 Jun 2016 14:27:15 +0800 Subject: [PATCH] Stop having things silently fail. --- app/models/topic.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/topic.rb b/app/models/topic.rb index 77f2e0afd..0787d5273 100644 --- a/app/models/topic.rb +++ b/app/models/topic.rb @@ -552,7 +552,7 @@ class Topic < ActiveRecord::Base if new_post.present? # If we are moving posts, we want to insert the moderator post where the previous posts were # in the stream, not at the end. - new_post.update_attributes(post_number: opts[:post_number], sort_order: opts[:post_number]) if opts[:post_number].present? + new_post.update_attributes!(post_number: opts[:post_number], sort_order: opts[:post_number]) if opts[:post_number].present? # Grab any links that are present TopicLink.extract_from(new_post)