mirror of https://github.com/docusealco/docuseal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
327 B
16 lines
327 B
# 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
|