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:
parent
f647ebd9e0
commit
217f2f3a3c
@ -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
|
||||
|
@ -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|
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user