Safest way to overwrite existing user settings?


(Jesse Perry) #1

Trying to change existing user settings on tracking a topic (0 milliseconds), as that’s my new default, but doesn’t cover existing users. Any tips on safest way to do this? :slight_smile:


(Sam Saffron) #2

question is, are you sure your end users did not muck with it manually and now you will be resetting them to something they do not want and opted out of?


(Jesse Perry) #3

Yes. Just started the discourse community.


(Sam Saffron) #4
./launcher enter app
rails c
> User.update_all(auto_track_topics_after_msecs:0)

(Jesse Perry) #5

Thank you!

For future searchers, this is also a good reference on doing this with other settings: