I’m using bcrpt, but I want to set a password arbitrarily
I made it possible to set a password for posts with bcrpt,
By default, empty posts are set to be played, so
I will show you how to cancel it.
- The method for setting a password for posting is introduced below.
Just add (validations: false) next to has_secure_password.
class Post < ApplicationRecord has_secure_password(validations: false) end
You can now post blank posts by disabling validation.