rails/rails — pull request #13118 by joshuasmock (2013-11-30 22:05:49+00:00)
Title: Added method "on:" that allows a user to use has_secure_password on update or create

This commit allows a choice of when to use `has_secure_password`, either on `create` or `update`. When `has_secure_password on: :update` is called, the class will not check password creation on create but will check on update.

My use case is I am running a centrally managed application and I don't create passwords for users automatically; rather, I have the user activate their account and create their password on activation.