Files
grecia/app/components/polls/form_component.html.erb
Javi Martín 8deb1964bd Show errors when submitting too many answers
This could be the case when JavaScript is disabled.

Note that, in `Poll/WebVote` we're calling `given_answers` inside a
transaction. Putting this code before the transaction resulted in a test
failing sometimes, probably because of a bug that might be possible to
reproduce by doing simultaneous requests.
2025-08-14 13:06:43 +02:00

8 lines
292 B
Plaintext

<%= form_for web_vote, form_attributes do |f| %>
<% questions.each do |question| %>
<%= render Polls::Questions::QuestionComponent.new(question, form: f, disabled: disabled?) %>
<% end %>
<%= f.submit(class: "button", value: t("polls.form.vote"), disabled: disabled?) %>
<% end %>