Skip to content

A platform for community discussion. Free, open, simple.

DEV: improve the code readability.

Vinoth Kannanb0f72ca1d69c
diff --git a/lib/post_revisor.rb b/lib/post_revisor.rb
index c5c61679f62..d9647293f59 100644
--- a/lib/post_revisor.rb
+++ b/lib/post_revisor.rb
@@ -359,7 +359,9 @@ class PostRevisor
end
POST_TRACKED_FIELDS.each do |field|
- @post.public_send("#{field}=", @fields[field]) if @fields.has_key?(field) || (should_create_new_version? && field == "edit_reason")
+ if @fields.has_key?(field) || (should_create_new_version? && field == "edit_reason")
+ @post.public_send("#{field}=", @fields[field])
+ end
end
@post.last_editor_id = @editor.id