fixes #1620
This commit is contained in:
@@ -870,8 +870,6 @@ class Post < ActiveRecord::Base
|
||||
|
||||
module VersionMethods
|
||||
def create_version
|
||||
return if disable_versioning
|
||||
|
||||
if new_record? || rating_changed? || source_changed? || parent_id_changed? || tag_string_changed?
|
||||
CurrentUser.increment!(:post_update_count)
|
||||
versions.create(
|
||||
|
||||
@@ -130,7 +130,6 @@ class TagAlias < ActiveRecord::Base
|
||||
escaped_antecedent_name = Regexp.escape(antecedent_name)
|
||||
fixed_tags = post.tag_string.sub(/(?:\A| )#{escaped_antecedent_name}(?:\Z| )/, " #{consequent_name} ").strip
|
||||
CurrentUser.scoped(creator, creator_ip_addr) do
|
||||
post.disable_versioning = true
|
||||
post.update_attributes(
|
||||
:tag_string => fixed_tags
|
||||
)
|
||||
|
||||
@@ -109,7 +109,6 @@ class TagImplication < ActiveRecord::Base
|
||||
escaped_tag_name = Regexp.escape(tag_name)
|
||||
fixed_tags = post.tag_string.sub(/(?:\A| )#{escaped_tag_name}(?:\Z| )/, " ").strip
|
||||
CurrentUser.scoped(User.find(creator_id), creator_ip_addr) do
|
||||
post.disable_versioning = true
|
||||
post.update_attributes(
|
||||
:tag_string => fixed_tags
|
||||
)
|
||||
@@ -155,7 +154,6 @@ class TagImplication < ActiveRecord::Base
|
||||
escaped_antecedent_name = Regexp.escape(antecedent_name)
|
||||
fixed_tags = post.tag_string.sub(/(?:\A| )#{escaped_antecedent_name}(?:\Z| )/, " #{antecedent_name} #{descendant_names} ").strip
|
||||
CurrentUser.scoped(creator, creator_ip_addr) do
|
||||
post.disable_versioning = true
|
||||
post.update_attributes(
|
||||
:tag_string => fixed_tags
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user