1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

bug fix: xlsx export are not corrupted anymore

This commit is contained in:
Nicolas Florentin 2022-01-06 13:43:51 +01:00
parent f647ebd9e0
commit 217f2f3a3c
3 changed files with 5 additions and 5 deletions

View File

@ -26,7 +26,7 @@ class AvailabilitiesExportService
content = av.render template: 'exports/availabilities_index.xlsx.axlsx'
# write content to file
File.open(export.file, 'w+b') { |f| f.puts content }
File.open(export.file, 'w+b') { |f| f.write content }
end
end

View File

@ -39,7 +39,7 @@ class StatisticsExportService
content = av.render template: 'exports/statistics_global.xlsx.axlsx'
# write content to file
File.open(export.file, 'w+b') { |f| f.puts content }
File.open(export.file, 'w+b') { |f| f.write content }
end
%w[account event machine project subscription training space].each do |path|

View File

@ -26,7 +26,7 @@ class UsersExportService
content = av.render template: 'exports/users_subscriptions.xlsx.axlsx'
# write content to file
File.open(export.file, 'w+b') { |f| f.puts content }
File.open(export.file, 'w+b') { |f| f.write content }
end
# export reservations
@ -44,7 +44,7 @@ class UsersExportService
content = av.render template: 'exports/users_reservations.xlsx.axlsx'
# write content to file
File.open(export.file, 'w+b') { |f| f.puts content }
File.open(export.file, 'w+b') { |f| f.write content }
end
# export members
@ -65,7 +65,7 @@ class UsersExportService
content = av.render template: 'exports/users_members.xlsx.axlsx'
# write content to file
File.open(export.file, 'w+b') { |f| f.puts content }
File.open(export.file, 'w+b') { |f| f.write content }
end
end