diff --git a/app/views/home/_talk.csv.erb b/app/views/home/_talk.csv.erb index b2a63e8..6cf9741 100644 --- a/app/views/home/_talk.csv.erb +++ b/app/views/home/_talk.csv.erb @@ -1 +1 @@ -<%= CSV.generate_line([talk.id, talk.event_type.name, talk.title, talk.subtitle, @ratings[talk.id]]).html_safe -%> +<%= CSV.generate_line([talk.id, talk.event_type.name, talk.title, talk.subtitle, @ratings[talk.id], "%.2f%" % Rational(100 * @ratings[talk.id], @votes_count).to_f]).html_safe -%> diff --git a/app/views/home/ratings.csv.erb b/app/views/home/ratings.csv.erb index 2a8e6ef..dab9902 100644 --- a/app/views/home/ratings.csv.erb +++ b/app/views/home/ratings.csv.erb @@ -1,3 +1,3 @@ -<%- headers = ['ID', 'Type', 'Title', 'Subtitle', 'Votes'] -%> +<%- headers = ['ID', 'Type', 'Title', 'Subtitle', 'Votes', '%'] -%> <%= CSV.generate_line headers -%> <%= render partial: 'talk', collection: @talks %>