mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 06:42:32 -05:00
download users csv
This commit is contained in:
1 parent
89e797b95f
commit
2303c21cea
3 files changed
+41
-2
No files matched your search
@@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Users
|
||||
module_function
|
||||
|
||||
def generate_csv(users)
|
||||
headers = %w[email first_name last_name role current_sign_in_at last_sign_in_at updated_at created_at]
|
||||
|
||||
CSVSafe.generate do |csv|
|
||||
csv << headers
|
||||
|
||||
users.each { |user| csv << user.values_at(*headers) }
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user