更改:csv写入模式
This commit is contained in:
parent
c999d37f7e
commit
68348f1fc3
|
@ -36,7 +36,7 @@ class Oauth::AcgeController < Oauth::BaseController
|
|||
existing_rows = CSV.read("public/操作系统大赛用户信息.csv")
|
||||
new_row = [username, email, password, phone, name]
|
||||
existing_rows << new_row
|
||||
CSV.open("public/操作系统大赛用户信息.csv", 'w') do |csv|
|
||||
CSV.open("public/操作系统大赛用户信息.csv", 'wb') do |csv|
|
||||
existing_rows.each { |row| csv << row }
|
||||
end
|
||||
if reg_result[:message].blank?
|
||||
|
|
Loading…
Reference in New Issue