Created
August 17, 2022 14:33
-
-
Save scytacki/eca802edc12cdae573babb29a64577d9 to your computer and use it in GitHub Desktop.
List LARA admins users
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('csv') | |
users = User.where(is_admin: true) | |
output = CSV.generate { |csv| | |
users.each{ |user| | |
csv << [ | |
user.id, | |
user.email, | |
user.last_sign_in_at | |
] | |
} | |
};nil | |
puts output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment