From 328b19c429c60d68585fba4507c7082b57bc9808 Mon Sep 17 00:00:00 2001 From: Larissa Reis Date: Sat, 9 Nov 2013 17:47:15 -0300 Subject: [PATCH] Changes date format in csv --- plugins/custom_forms/controllers/custom_forms_plugin_myprofile_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/custom_forms/controllers/custom_forms_plugin_myprofile_controller.rb b/plugins/custom_forms/controllers/custom_forms_plugin_myprofile_controller.rb index 6aa9829..21ca690 100644 --- a/plugins/custom_forms/controllers/custom_forms_plugin_myprofile_controller.rb +++ b/plugins/custom_forms/controllers/custom_forms_plugin_myprofile_controller.rb @@ -73,7 +73,7 @@ class CustomFormsPluginMyprofileController < MyProfileController columns = @form.fields.count + 3 csv_content = CSV.generate_line(['Timestamp', 'Name', 'Email'] + @form.fields.map(&:name)) + "\n" @submissions.each do |s| - fields = [s.updated_at, s.profile.present? ? s.profile.name : s.author_name, s.profile.present? ? s.profile.email : s.author_email] + fields = [s.updated_at.strftime('%Y/%m/%d %T %Z'), s.profile.present? ? s.profile.name : s.author_name, s.profile.present? ? s.profile.email : s.author_email] @form.fields.each do |f| fields << s.answers.select{|a| a.field == f}.map{|answer| answer.to_s} end -- libgit2 0.21.2