How to perform atomic increments in rails, what would be the best way to achieve this
user = User.find(id) invited_count = user.invited_count + 1 user.update!(invited_count: invited_count)
https://stackoverflow.com/questions/67443980/how-to-perform-atomic-increments-in-rails May 08, 2021 at 12:04PM
没有评论:
发表评论