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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user