validate_presence_of relies on the constant ActiveModel::SecurePassword::InstanceMethodsOnActivation
which has been removed in Rails 6 https://github.com/rails/rails/commit/08dde0f355e0450bc2cb7e0b4b95a0ec18d1a870#diff-a6f9af64a6d420eb1103e16c0a0a8f04L66
Found the same.
Looks like the third check could also return false when it should return true because the attribute can be assigned by the user now instead of always being password.
It would be really nice to have this fixed with new version of rails around the corner.
As a temporary workaround (as I did not need the password matchers) I used:
# spec/rails_helper.rb - add to bottom
class ActiveModel::SecurePassword::InstanceMethodsOnActivation; end;
@yagudaev We plan on including support for Rails 6 in the next immediate version, so this is included in the list of upcoming changes.
@yagudaev thanks for the workaround!
This is fixed now! ^
@mcmire can we get a new release now that Rails 6.0.0.rc1 is out? :) I just ran my test suite with the latest master on Rails 6 and it worked great 馃憤
Most helpful comment
It would be really nice to have this fixed with new version of rails around the corner.
As a temporary workaround (as I did not need the password matchers) I used: