Skip to content

Commit

Permalink
Remove superfluous rubocop:disable comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeldesu committed Oct 15, 2023
1 parent 9658f10 commit ffcaa5c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,8 @@ def member_of?(list) = list_memberships.pluck(:list_id).include? list.id
# @param question [Question] the question to answer
# @param content [String] the answer content
def answer(question, content)
# rubocop:disable Style/RedundantSelf
raise Errors::AnsweringOtherBlockedSelf if question.user&.blocking?(self)
raise Errors::AnsweringSelfBlockedOther if self.blocking?(question.user)
# rubocop:enable Style/RedundantSelf

Retrospring::Metrics::QUESTIONS_ANSWERED.increment

Expand All @@ -132,10 +130,8 @@ def answer(question, content)
def answered?(question) = question.answers.pluck(:user_id).include? id

def comment(answer, content)
# rubocop:disable Style/RedundantSelf
raise Errors::CommentingSelfBlockedOther if self.blocking?(answer.user)
raise Errors::CommentingOtherBlockedSelf if answer.user.blocking?(self)
# rubocop:enable Style/RedundantSelf

Retrospring::Metrics::COMMENTS_CREATED.increment

Expand Down
2 changes: 0 additions & 2 deletions app/models/user/reaction_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ module User::ReactionMethods
# smiles an answer or comment
# @param item [ApplicationRecord] the answer/comment to smile
def smile(item)
# rubocop:disable Style/RedundantSelf
raise Errors::ReactingSelfBlockedOther if self.blocking?(item.user)
raise Errors::ReactingOtherBlockedSelf if item.user.blocking?(self)
# rubocop:enable Style/RedundantSelf

::Appendable::Reaction.create!(user: self, parent: item, content: "🙂")
end
Expand Down
2 changes: 0 additions & 2 deletions app/models/user/relationship/follow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ module Follow
# Follow an user
def follow(target_user)
raise Errors::FollowingSelf if target_user == self
# rubocop:disable Style/RedundantSelf
raise Errors::FollowingOtherBlockedSelf if target_user.blocking?(self)
raise Errors::FollowingSelfBlockedOther if self.blocking?(target_user)
# rubocop:enable Style/RedundantSelf

create_relationship(active_follow_relationships, target_user)
end
Expand Down

0 comments on commit ffcaa5c

Please sign in to comment.