Create model for organizers

This commit is contained in:
ricola 2025-04-06 17:04:31 -06:00
parent c8bfea4898
commit abc26f733f
3 changed files with 44 additions and 2 deletions

View file

@ -2,10 +2,26 @@
<p><%= @vote.description %></p>
<p>Hello, <%= current_user.email %>.</p>
<h2>Organizers</h2>
<ul>
<% @vote.organizers.each do |organizer| %>
<li><%= organizer.user.email %></li>
<% end %>
</ul>
<form action="/votes/<%= @vote.secure_id %>/organizers" method="post">
<p>
<label for="email">Email</label>
<input type="text" name="email">
</p>
<button type="submit">Add new organizer</button>
</form>
<h2>Your ratings</h2>
<p>Hello, <%= current_user.email %>.</p>
<form action="/votes/<%= @vote.secure_id %>/ratings" method="post">
<ul>
<% @vote.candidates.each do |candidate| %>