Display only existing stats

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.
This commit is contained in:
Javi Martín
2019-03-18 18:07:09 +01:00
parent 76c7827cf4
commit 793bfed372
9 changed files with 277 additions and 85 deletions

View File

@@ -40,7 +40,7 @@
<div class="row margin">
<div class="small-12 medium-3 column sidebar">
<%= render "shared/stats/links" %>
<%= render "shared/stats/links", stats: @stats %>
<p><strong><%= link_to t("stats.advanced"), "#advanced_statistics" %></strong></p>
<ul class="menu vertical">