forked from e621ng/e621ng
[Cleanup] Remove takedown PRETTY_STATUS
This never worked because of string/symbol key mismatch
This commit is contained in:
parent
3b775e48bd
commit
3b26b0d30c
@ -1,10 +1,12 @@
|
||||
module TakedownsHelper
|
||||
def pretty_takedown_status(takedown)
|
||||
status = takedown.pretty_status
|
||||
classes = {'inactive' => 'sect_grey',
|
||||
'denied' => 'sect_red',
|
||||
'partial' => 'sect_green',
|
||||
'approved' => 'sect_green'}
|
||||
status = takedown.status.capitalize
|
||||
classes = {
|
||||
"inactive" => "sect_grey",
|
||||
"denied" => "sect_red",
|
||||
"partial" => "sect_green",
|
||||
"approved" => "sect_green",
|
||||
}
|
||||
tag.td(status, class: classes[takedown.status])
|
||||
end
|
||||
end
|
||||
|
@ -17,14 +17,6 @@ class Takedown < ApplicationRecord
|
||||
after_validation :normalize_deleted_post_ids
|
||||
before_save :update_post_count
|
||||
|
||||
PRETTY_STATUS = {
|
||||
'partial': 'Partially Approved'
|
||||
}
|
||||
|
||||
def pretty_status
|
||||
PRETTY_STATUS.fetch(status, status.capitalize)
|
||||
end
|
||||
|
||||
def initialize_fields
|
||||
self.status = "pending"
|
||||
self.vericode = Takedown.create_vericode
|
||||
|
Loading…
Reference in New Issue
Block a user