fix for mapfile format

This commit is contained in:
Kyle Drake 2016-05-25 06:42:17 -04:00
parent 7ef47038a8
commit 927c34ed01

View file

@ -106,7 +106,7 @@ task :compile_nginx_mapfiles => [:environment] do
end
File.open('./files/maps/sandboxed.txt', 'w') do |file|
usernames = DB["select username from sites where created_at > ? and (plan_type is null or plan_type='free')", 1.week.ago].all.collect {|s| s[:username]}.each {|username| file.write "#{username}\n"}
usernames = DB["select username from sites where created_at > ? and (plan_type is null or plan_type='free')", 1.week.ago].all.collect {|s| s[:username]}.each {|username| file.write "#{username} 1;\n"}
end
end