Commit 8d05d692 authored by Galen Evilla's avatar Galen Evilla

tweaks

parent 457b13e5
......@@ -7,7 +7,7 @@
<%
m=0
f=0
o=0
l=0
@candidate.votes.each do |v|
if v.user != nil
if v.user.gender=="Male"
......@@ -16,7 +16,7 @@
if v.user.gender=="Female"
f=f+1
else
o=o+1
l=l+1
end
end
end
......@@ -31,13 +31,13 @@
<tr>
<th>Male Voters</th>
<th>Female Voters</th>
<th>Other Voters</th>
<th>LGBT Voters</th>
<th>Total Votes</th>
</tr>
<tr>
<td><%= m%></td>
<td><%= f%></td>
<td><%= o%></td>
<td><%= l%></td>
<td><%= @candidate.votes.count %></td>
</tr>
</table>
......
......@@ -8,7 +8,7 @@
<%= f.input :first_name, required: true, autofocus: true %>
<%= f.input :last_name, required: true %>
<%= f.input :birthday, :end_year => Date.today.year - 18, :start_year => 1920, :order => [ :day, :month, :year], required: true %>
<%= f.input :gender, as: :select, collection: ["Male", "Female", "Other"], required: true %>
<%= f.input :gender, as: :select, collection: ["Male", "Female", "LGBT"], required: true %>
<%= f.input :email, required: true %>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
......
......@@ -9,7 +9,7 @@
<%=
f.input :birthday, :start_year => Date.today.year - 18, :end_year => 1920, :order => [ :day, :month, :year], :required => true
%>
<%= f.input :gender, as: :select, collection: ["Male", "Female", "Other"], required: true %>
<%= f.input :gender, as: :select, collection: ["Male", "Female", "LGBT"], required: true %>
<%= f.input :email, required: true %>
<%= f.input :password, required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length) %>
<%= f.input :password_confirmation, required: true %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment