remove timestamps
This commit is contained in:
@@ -52,13 +52,13 @@ class BulkUpdateRequest < ActiveRecord::Base
|
|||||||
CurrentUser.scoped(approver) do
|
CurrentUser.scoped(approver) do
|
||||||
AliasAndImplicationImporter.new(script, forum_topic_id, "1", true).process!
|
AliasAndImplicationImporter.new(script, forum_topic_id, "1", true).process!
|
||||||
update({ :status => "approved", :approver_id => CurrentUser.id, :skip_secondary_validations => true }, :as => CurrentUser.role)
|
update({ :status => "approved", :approver_id => CurrentUser.id, :skip_secondary_validations => true }, :as => CurrentUser.role)
|
||||||
forum_updater.update("[i]UPDATE #{date_timestamp}[/i]: The \"bulk update request ##{id}\":/bulk_update_requests?search%5Bid%5D=#{id} has been approved.", "APPROVED")
|
forum_updater.update("The \"bulk update request ##{id}\":/bulk_update_requests?search%5Bid%5D=#{id} has been approved.", "APPROVED")
|
||||||
end
|
end
|
||||||
|
|
||||||
rescue Exception => x
|
rescue Exception => x
|
||||||
self.approver = approver
|
self.approver = approver
|
||||||
CurrentUser.scoped(approver) do
|
CurrentUser.scoped(approver) do
|
||||||
forum_updater.update("[i]UPDATE #{date_timestamp}[/i]: \"Bulk update request ##{id}\":/bulk_update_requests?search%5Bid%5D=#{id} failed: #{x.to_s}", "FAILED")
|
forum_updater.update("The \"Bulk update request ##{id}\":/bulk_update_requests?search%5Bid%5D=#{id} has failed: #{x.to_s}", "FAILED")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ class BulkUpdateRequest < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def reject!
|
def reject!
|
||||||
forum_updater.update("[i]UPDATE #{date_timestamp}[/i]: The \"bulk update request ##{id}\":/bulk_update_requests?search%5Bid%5D=#{id} has been rejected.", "REJECTED")
|
forum_updater.update("The \"bulk update request ##{id}\":/bulk_update_requests?search%5Bid%5D=#{id} has been rejected.", "REJECTED")
|
||||||
update_attribute(:status, "rejected")
|
update_attribute(:status, "rejected")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -87,19 +87,19 @@ class TagAlias < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def approval_message
|
def approval_message
|
||||||
"[i]UPDATE #{date_timestamp}[/i]: The tag alias [[#{antecedent_name}]] -> [[#{consequent_name}]] (alias ##{id}) has been approved."
|
"The tag alias [[#{antecedent_name}]] -> [[#{consequent_name}]] (alias ##{id}) has been approved."
|
||||||
end
|
end
|
||||||
|
|
||||||
def failure_message(e = nil)
|
def failure_message(e = nil)
|
||||||
"[i]UPDATE #{date_timestamp}[/i]: The tag alias [[#{antecedent_name}]] -> [[#{consequent_name}]] (alias ##{id}) failed during processing. Reason: #{e}"
|
"The tag alias [[#{antecedent_name}]] -> [[#{consequent_name}]] (alias ##{id}) failed during processing. Reason: #{e}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def reject_message
|
def reject_message
|
||||||
"[i]UPDATE #{date_timestamp}[/i]: The tag alias [[#{antecedent_name}]] -> [[#{consequent_name}]] (alias ##{id}) has been rejected."
|
"The tag alias [[#{antecedent_name}]] -> [[#{consequent_name}]] (alias ##{id}) has been rejected."
|
||||||
end
|
end
|
||||||
|
|
||||||
def conflict_message
|
def conflict_message
|
||||||
"[i]UPDATE #{date_timestamp}[/i]: The tag alias [[#{antecedent_name}]] -> [[#{consequent_name}]] (alias ##{id}) has conflicting wiki pages. [[#{consequent_name}]] should be updated to include information from [[#{antecedent_name}]] if necessary."
|
"The tag alias [[#{antecedent_name}]] -> [[#{consequent_name}]] (alias ##{id}) has conflicting wiki pages. [[#{consequent_name}]] should be updated to include information from [[#{antecedent_name}]] if necessary."
|
||||||
end
|
end
|
||||||
|
|
||||||
def date_timestamp
|
def date_timestamp
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ class TagImplication < ActiveRecord::Base
|
|||||||
update_posts
|
update_posts
|
||||||
update({ :status => "active" }, :as => CurrentUser.role)
|
update({ :status => "active" }, :as => CurrentUser.role)
|
||||||
update_descendant_names_for_parents
|
update_descendant_names_for_parents
|
||||||
forum_updater.update("[i]UPDATE #{date_timestamp}[/i]: The tag implication #{antecedent_name} -> #{consequent_name} has been approved.", "APPROVED") if update_topic
|
forum_updater.update("The tag implication #{antecedent_name} -> #{consequent_name} has been approved.", "APPROVED") if update_topic
|
||||||
end
|
end
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
if tries < 5
|
if tries < 5
|
||||||
@@ -199,7 +199,7 @@ class TagImplication < ActiveRecord::Base
|
|||||||
retry
|
retry
|
||||||
end
|
end
|
||||||
|
|
||||||
forum_updater.update("[i]UPDATE #{date_timestamp}[/i]: The tag implication #{antecedent_name} -> #{consequent_name} failed during processing. Reason: #{e}", "FAILED") if update_topic
|
forum_updater.update("The tag implication #{antecedent_name} -> #{consequent_name} failed during processing. Reason: #{e}", "FAILED") if update_topic
|
||||||
update({ :status => "error: #{e}" }, :as => CurrentUser.role)
|
update({ :status => "error: #{e}" }, :as => CurrentUser.role)
|
||||||
|
|
||||||
if Rails.env.production?
|
if Rails.env.production?
|
||||||
@@ -228,7 +228,7 @@ class TagImplication < ActiveRecord::Base
|
|||||||
|
|
||||||
def reject!
|
def reject!
|
||||||
update({ :status => "deleted", }, :as => CurrentUser.role)
|
update({ :status => "deleted", }, :as => CurrentUser.role)
|
||||||
forum_updater.update("[i]UPDATE #{date_timestamp}[/i]: The tag implication #{antecedent_name} -> #{consequent_name} has been rejected.", "REJECTED")
|
forum_updater.update("The tag implication #{antecedent_name} -> #{consequent_name} has been rejected.", "REJECTED")
|
||||||
destroy
|
destroy
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user