From a90a1bd8954358373268b780b86fc8213481edba Mon Sep 17 00:00:00 2001 From: r888888888 Date: Mon, 27 Feb 2017 15:41:45 -0800 Subject: [PATCH] fix boolean checks in postarchive --- app/models/post_archive.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/post_archive.rb b/app/models/post_archive.rb index 8b92f1560..77fe48047 100644 --- a/app/models/post_archive.rb +++ b/app/models/post_archive.rb @@ -192,7 +192,7 @@ class PostArchive < ActiveRecord::Base latest_tags << "parent:#{post.parent_id}" if post.parent_id.present? latest_tags << "source:#{post.source}" if post.source.present? - if parent_changed? + if parent_changed delta[:added_tags] << "parent:#{parent_id}" if previous @@ -200,7 +200,7 @@ class PostArchive < ActiveRecord::Base end end - if rating_changed? + if rating_changed delta[:added_tags] << "rating:#{rating}" if previous @@ -208,7 +208,7 @@ class PostArchive < ActiveRecord::Base end end - if source_changed? + if source_changed delta[:added_tags] << "source:#{source}" if previous @@ -285,7 +285,7 @@ class PostArchive < ActiveRecord::Base end def method_attributes - super + [:added_tags, :removed_tags, :obsolete_added_tags, :obsolete_removed_tags, :unchanged_tags, :updater_name] + super + [:obsolete_added_tags, :obsolete_removed_tags, :unchanged_tags, :updater_name] end memoize :previous, :post, :tag_array, :changes, :added_tags_with_fields, :removed_tags_with_fields, :obsolete_removed_tags, :obsolete_added_tags, :unchanged_tags