Should we have a setup_activation method that saves to database?#605
Should we have a setup_activation method that saves to database?#605weimeng wants to merge 1 commit intoNoamB:masterfrom
Conversation
|
I also just realised that the existing |
|
Hi @weimeng, thanks for contribution! Currently I need to think about good solution. Maybe indeed it's good idea to have the bang method as well. I'll get back to this issue later this week. |
|
Glad to help! Let me know, I'll be happy to contribute further code to this as I'm using this functionality in a current project. |
Just raising this pull request as a discussion to see if we should be adding this behaviour, or leaving it to the individual to implement on their own.
The reason is that when I saw that there was a
setup_activationmethod, I assumed that it also wrote to the database -- but this turned out not to be true.I added the following instance method:
Then I realised I could just have easily did the following in my own project:
Which should we prefer?