diff --git a/app/components/polls/results/question_component.rb b/app/components/polls/results/question_component.rb index ce41ca1fc..ba84d2108 100644 --- a/app/components/polls/results/question_component.rb +++ b/app/components/polls/results/question_component.rb @@ -1,7 +1,7 @@ class Polls::Results::QuestionComponent < ApplicationComponent attr_reader :question - def initialize(question:) + def initialize(question) @question = question end diff --git a/app/components/polls/results_component.html.erb b/app/components/polls/results_component.html.erb index 28e33ad82..cb43c0596 100644 --- a/app/components/polls/results_component.html.erb +++ b/app/components/polls/results_component.html.erb @@ -16,7 +16,9 @@
- <%= render Polls::Results::QuestionComponent.with_collection(poll.questions) %> + <% poll.questions.each do |question| %> + <%= render Polls::Results::QuestionComponent.new(question) %> + <% end %>