posts: remove unused appeal! method.

This commit is contained in:
evazion
2020-01-24 23:51:37 -06:00
parent a3e16c167f
commit ec163f96a8
4 changed files with 9 additions and 26 deletions

View File

@@ -276,18 +276,6 @@ class Post < ApplicationRecord
end
end
def appeal!(reason)
if is_status_locked?
raise PostAppeal::Error.new("Post is locked and cannot be appealed")
end
appeal = appeals.create(:reason => reason)
if appeal.errors.any?
raise PostAppeal::Error.new(appeal.errors.full_messages.join("; "))
end
end
def approve!(approver = CurrentUser.user)
approvals.create(user: approver)
end