fixes #2540: Add is_resolved to post appeal results

This commit is contained in:
r888888888
2015-10-27 11:23:26 -07:00
parent b695a7980f
commit 3008a70b10
3 changed files with 7 additions and 1 deletions

View File

@@ -68,6 +68,10 @@ class PostAppeal < ActiveRecord::Base
extend SearchMethods
def resolved?
!post.is_deleted? && !post.is_flagged?
end
def validate_creator_is_not_limited
if appeal_count_for_creator >= Danbooru.config.max_appeals_per_day
errors[:creator] << "can appeal at most #{Danbooru.config.max_appeals_per_day} post a day"