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.
https://qiita.com/hiruhiru/items/9dffc729f5192df243a8
Just add (validations: false) next to has_secure_password.
qiita.rb
class Post < ApplicationRecord
has_secure_password(validations: false)
end
You can now post blank posts by disabling validation.
Recommended Posts