Keep track of who rejects alias/impl/bur

Since anyone builder+ can now reject these I don't think it should
always be attributed to albert.
This commit is contained in:
Toks
2015-07-02 11:37:22 -04:00
parent 9064d07c14
commit d33fd43d9d
3 changed files with 18 additions and 30 deletions

View File

@@ -121,23 +121,19 @@ class BulkUpdateRequest < ActiveRecord::Base
def update_forum_topic_for_approve def update_forum_topic_for_approve
if forum_topic if forum_topic
CurrentUser.scoped(User.admins.first, "127.0.0.1") do
forum_topic.posts.create( forum_topic.posts.create(
:body => "The bulk update request ##{id} has been approved." :body => "The bulk update request ##{id} has been approved."
) )
end end
end end
end
def update_forum_topic_for_reject def update_forum_topic_for_reject
if forum_topic if forum_topic
CurrentUser.scoped(User.admins.first, "127.0.0.1") do
forum_topic.posts.create( forum_topic.posts.create(
:body => "The bulk update request ##{id} has been rejected." :body => "The bulk update request ##{id} has been rejected."
) )
end end
end end
end
def normalize_text def normalize_text
self.script = script.downcase self.script = script.downcase

View File

@@ -235,23 +235,19 @@ class TagAlias < ActiveRecord::Base
def update_forum_topic_for_approve def update_forum_topic_for_approve
if forum_topic if forum_topic
CurrentUser.scoped(User.admins.first, "127.0.0.1") do
forum_topic.posts.create( forum_topic.posts.create(
:body => "The tag alias #{antecedent_name} -> #{consequent_name} has been approved." :body => "The tag alias #{antecedent_name} -> #{consequent_name} has been approved."
) )
end end
end end
end
def update_forum_topic_for_reject def update_forum_topic_for_reject
if forum_topic if forum_topic
CurrentUser.scoped(User.admins.first, "127.0.0.1") do
forum_topic.posts.create( forum_topic.posts.create(
:body => "The tag alias #{antecedent_name} -> #{consequent_name} has been rejected." :body => "The tag alias #{antecedent_name} -> #{consequent_name} has been rejected."
) )
end end
end end
end
def update_forum_topic_for_wiki_conflict def update_forum_topic_for_wiki_conflict
if forum_topic if forum_topic

View File

@@ -218,23 +218,19 @@ class TagImplication < ActiveRecord::Base
def update_forum_topic_for_approve def update_forum_topic_for_approve
if forum_topic if forum_topic
CurrentUser.scoped(User.admins.first, "127.0.0.1") do
forum_topic.posts.create( forum_topic.posts.create(
:body => "The tag implication #{antecedent_name} -> #{consequent_name} has been approved." :body => "The tag implication #{antecedent_name} -> #{consequent_name} has been approved."
) )
end end
end end
end
def update_forum_topic_for_reject def update_forum_topic_for_reject
if forum_topic if forum_topic
CurrentUser.scoped(User.admins.first, "127.0.0.1") do
forum_topic.posts.create( forum_topic.posts.create(
:body => "The tag implication #{antecedent_name} -> #{consequent_name} has been rejected." :body => "The tag implication #{antecedent_name} -> #{consequent_name} has been rejected."
) )
end end
end end
end
def reject! def reject!
update_forum_topic_for_reject update_forum_topic_for_reject