Converted flag threshold constants to enums

This commit is contained in:
Robin Ward
2013-03-18 14:59:34 -04:00
parent aea848f164
commit 5aec5261a7
4 changed files with 9 additions and 10 deletions

View File

@@ -69,7 +69,7 @@ class PostRevisor
@post.updated_by = @user
@post.last_editor_id = @user.id
if @post.hidden && @post.hidden_reason_id == Post::HiddenReason::FLAG_THRESHOLD_REACHED
if @post.hidden && @post.hidden_reason_id == Post.hidden_reasons[:flag_threshold_reached]
@post.hidden = false
@post.hidden_reason_id = nil
@post.topic.update_attributes(visible: true)