dynamic requests: handle deleted/processing/queued statuses (#3824)

Fix bug where [ta:1234] didn't render if the request's status was
'deleted', 'queued', or 'processing'.
This commit is contained in:
evazion
2019-01-24 13:52:16 -06:00
parent 4fe7f5eff9
commit 1292717c52
2 changed files with 16 additions and 9 deletions

View File

@@ -43,10 +43,18 @@ class TagRelationship < ApplicationRecord
self.consequent_name = consequent_name.mb_chars.downcase.tr(" ", "_")
end
def is_approved?
status.in?(%w[active processing queued])
end
def is_retired?
status == "retired"
end
def is_deleted?
status == "deleted"
end
def is_pending?
status == "pending"
end