mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
Merge branch 'bug-fix-xlsx-exports' into 'dev'
bug fix: xlsx export are not corrupted anymore See merge request projets/fab-manager!5
This commit is contained in:
commit
5097c1382b
@ -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…
x
Reference in New Issue
Block a user