I am using gem 'chartkick' and have such code:
<%= pie_chart question.responses.group(:answer_variant_id).count %>
the table responses is connected with table answer_variants through answer_variant_id. Currently my pie chart shows answer variant ids, but how could I make it displaying answer_variant.title?
Thanks
I resolved this. Needed to join another table. The answer looks like this: