Fix Rails/Delegate rubocop issue
This commit is contained in:
@@ -365,12 +365,6 @@ Performance/RedundantMatch:
|
||||
- 'app/controllers/valuation/spending_proposals_controller.rb'
|
||||
- 'app/helpers/embed_videos_helper.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
Rails/Delegate:
|
||||
Exclude:
|
||||
- 'app/models/poll/question.rb'
|
||||
|
||||
# Offense count: 5
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: Whitelist.
|
||||
|
||||
@@ -58,9 +58,7 @@ class Poll::Question < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
|
||||
def answerable_by?(user)
|
||||
poll.answerable_by?(user)
|
||||
end
|
||||
delegate :answerable_by?, to: :poll
|
||||
|
||||
def self.answerable_by(user)
|
||||
return none if user.nil? || user.unverified?
|
||||
|
||||
Reference in New Issue
Block a user