Add component to render the form poll

Right now it just renders the questions as it used to.
This commit is contained in:
Javi Martín
2024-05-14 20:45:21 +02:00
parent dae932b0d2
commit eccf906e45
3 changed files with 9 additions and 1 deletions

View File

@@ -0,0 +1 @@
<%= render Polls::Questions::QuestionComponent.with_collection(questions) %>

View File

@@ -0,0 +1,7 @@
class Polls::FormComponent < ApplicationComponent
attr_reader :questions
def initialize(questions)
@questions = questions
end
end

View File

@@ -31,7 +31,7 @@
<% end %>
<% end %>
<%= render Polls::Questions::QuestionComponent.with_collection(@questions) %>
<%= render Polls::FormComponent.new(@questions) %>
</div>
</div>