File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,14 +16,6 @@ class CommentThread < ApplicationRecord
1616
1717 after_create :create_follower
1818
19- # Are there any threads on a given post that a given user follows?
20- # @param post [Post] post to check
21- # @param user [User] user to check
22- # @return [Boolean] check result
23- def self . post_followed? ( post , user )
24- ThreadFollower . where ( post : post , user : user ) . any?
25- end
26-
2719 # Is the thread read-only (can't be edited)?
2820 # @return [Boolean] check result
2921 def read_only?
Original file line number Diff line number Diff line change @@ -234,6 +234,10 @@ def reaction_list
234234 . to_h { |_k , v | [ v . first . reaction_type , v ] }
235235 end
236236
237+ # Are new threads on this post followed by this user?
238+ # @param post [Post] post to check
239+ # @param user [User] user to check
240+ # @return [Boolean] check result
237241 def followed_by? ( user )
238242 ThreadFollower . where ( post : self , user : user ) . any?
239243 end
You can’t perform that action at this time.
0 commit comments