app/models/post/tag_methods.rb
# new, previous and latest are History objects for cached_tags.  Split
# the tag changes apart.
new, previous and latest are History objects for cached_tags.  Split
the tag changes apart.
new previous and latest are History objects for cached_tags . Split the tag changes apart .
def tag_changes(new, previous, latest)
      new_tags = new.value.scan(/\S+/)
      old_tags = (previous.value rescue "").scan(/\S+/)
      latest_tags = latest.value.scan(/\S+/)
      {
        :added_tags => new_tags - old_tags,
        :removed_tags => old_tags - new_tags,
        :unchanged_tags => new_tags & old_tags,
        :obsolete_added_tags => (new_tags - old_tags) - latest_tags,
        :obsolete_removed_tags => (old_tags - new_tags) & latest_tags
      }
    end
def tag_changes ( new , previous , latest ) new_tags = new . value . scan ( / \S + / ) old_tags = ( previous . value rescue "" ) . scan ( / \S + / ) latest_tags = latest . value . scan ( / \S + / ) { :added_tags => new_tags - old_tags , :removed_tags => old_tags - new_tags , :unchanged_tags => new_tags & old_tags , :obsolete_added_tags => ( new_tags - old_tags ) - latest_tags , :obsolete_removed_tags => ( old_tags - new_tags ) & latest_tags } end
new, previous and latest are History objects for cached_tags.
new previous and latest are History objects for cached_tags .
new
previous
latest