mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-21 20:25:45 +08:00
更改:csv写入模式
This commit is contained in:
@@ -36,7 +36,7 @@ class Oauth::AcgeController < Oauth::BaseController
|
|||||||
existing_rows = CSV.read("public/操作系统大赛用户信息.csv")
|
existing_rows = CSV.read("public/操作系统大赛用户信息.csv")
|
||||||
new_row = [username, email, password, phone, name]
|
new_row = [username, email, password, phone, name]
|
||||||
existing_rows << new_row
|
existing_rows << new_row
|
||||||
CSV.open("public/操作系统大赛用户信息.csv", 'w') do |csv|
|
CSV.open("public/操作系统大赛用户信息.csv", 'wb') do |csv|
|
||||||
existing_rows.each { |row| csv << row }
|
existing_rows.each { |row| csv << row }
|
||||||
end
|
end
|
||||||
if reg_result[:message].blank?
|
if reg_result[:message].blank?
|
||||||
|
|||||||
Reference in New Issue
Block a user