From efffdd3778fc960280c7677906ed43dae5a952b0 Mon Sep 17 00:00:00 2001 From: abcang Date: Thu, 7 Jan 2021 17:40:55 +0900 Subject: Fix rubocop config and warnings (#15503) * disable NewCops * update TargetRubyVersion * Fix Lint/MissingSuper for ActiveModelSerializers::Model * Fix Lint/MissingSuper for feed * Fix Lint/FloatComparison * Do not use instance variables --- app/models/poll.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'app/models/poll.rb') diff --git a/app/models/poll.rb b/app/models/poll.rb index e1ca55252..d2a17277b 100644 --- a/app/models/poll.rb +++ b/app/models/poll.rb @@ -73,10 +73,12 @@ class Poll < ApplicationRecord attributes :id, :title, :votes_count, :poll def initialize(poll, id, title, votes_count) - @poll = poll - @id = id - @title = title - @votes_count = votes_count + super( + poll: poll, + id: id, + title: title, + votes_count: votes_count, + ) end end -- cgit