diff --git a/app/models/post.rb b/app/models/post.rb index a88b52da938..98842c916ce 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -317,6 +317,10 @@ class Post < ActiveRecord::Base result end + def is_first_post? + post_number == 1 + end + def is_flagged? post_actions.where(post_action_type_id: PostActionType.flag_types.values, deleted_at: nil).count != 0 end