So if we don't have information regarding gender, age or geozone, stats regarding those topics will not be shown. Note we're using `spec/models/statisticable_spec.rb` because having the same file in `spec/models/concerns` caused the tests to be executed twice. Also note the implementation behind the `gender?`, `age?` and `geozone?` methods is a bit primitive. We might need to make it more robust in the future.
16 lines
512 B
Plaintext
16 lines
512 B
Plaintext
<div id="participants_by_gender" class="stats-group">
|
|
<h4><%= t("stats.by_gender") %></h4>
|
|
|
|
<%= number_with_info_tags(
|
|
stats.total_male_participants,
|
|
t("stats.men_percentage", percentage: number_to_stats_percentage(stats.male_percentage)),
|
|
html_class: "participants male"
|
|
) %>
|
|
|
|
<%= number_with_info_tags(
|
|
stats.total_female_participants,
|
|
t("stats.women_percentage", percentage: number_to_stats_percentage(stats.female_percentage)),
|
|
html_class: "participants female"
|
|
) %>
|
|
</div>
|