disable tos redirect

This commit is contained in:
albert
2013-02-24 11:43:24 -05:00
parent bb3508a536
commit 65a87941e6
8 changed files with 14 additions and 17 deletions

View File

@@ -37,6 +37,10 @@ class Tag < ActiveRecord::Base
def counts_for(tag_names)
select_all_sql("SELECT name, post_count FROM tags WHERE name IN (?)", tag_names)
end
def fix_post_count
update_column(:post_count, Post.tag_match("#{name} status:any").count)
end
end
module ViewCountMethods

View File

@@ -105,7 +105,7 @@ class TagAlias < ActiveRecord::Base
end
def update_posts
Post.tag_match(antecedent_name).find_each do |post|
Post.tag_match("#{antecedent_name} status:any").find_each do |post|
escaped_antecedent_name = Regexp.escape(antecedent_name)
fixed_tags = post.tag_string.sub(/(?:\A| )#{escaped_antecedent_name}(?:\Z| )/, " #{consequent_name} ").strip

View File

@@ -119,7 +119,7 @@ class TagImplication < ActiveRecord::Base
end
def update_posts
Post.tag_match(antecedent_name).find_each do |post|
Post.tag_match("#{antecedent_name} status:any").find_each do |post|
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