Export in a more sensible format

This commit is contained in:
Petko Bordjukov 2015-10-15 01:20:32 +03:00
parent 249b07f5fe
commit cfcde965fe
2 changed files with 4 additions and 2 deletions

View File

@ -1 +1,3 @@
<%= CSV.generate_line([talk_preference.hashed_unique_id, talk_preference.created_at] + @talks.map(&:id).map { |talk| talk_preference.include? talk }).html_safe -%> <% talk_preference.talks.each do |talk| %>
<%= CSV.generate_line([talk_preference.hashed_unique_id, talk_preference.created_at, talk]).html_safe -%>
<% end %>

View File

@ -1,3 +1,3 @@
<%- headers = ['ID', 'Created at'] + @talks.map(&:id) -%> <%- headers = ['ID', 'Created at', 'Talk'] -%>
<%= CSV.generate_line headers -%> <%= CSV.generate_line headers -%>
<%= render partial: 'talk_preference', collection: @talk_preferences %> <%= render partial: 'talk_preference', collection: @talk_preferences %>