Change all api tokens automatically
Do you have any tips on how I can change automatically the api tokens for all my users ?
Hi, seems quite simple.
From rails console run:
User.all.each do |user| user.api_token.try(:destroy) user.reload end
Please try the code on your own risk (not tested and provided as example, try it in development environment first and see effects).