mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 12:29:54 +01:00
Remove superfluous rubocop:disable comments
This commit is contained in:
parent
9658f10838
commit
ffcaa5c4d9
3 changed files with 0 additions and 8 deletions
|
@ -117,10 +117,8 @@ class User < ApplicationRecord
|
|||
# @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
|
||||
|
||||
|
@ -132,10 +130,8 @@ class User < ApplicationRecord
|
|||
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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -19,10 +19,8 @@ class User
|
|||
# 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
|
||||
|
|
Loading…
Reference in a new issue