Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation is broken in Rails 7 #18

Open
5minpause opened this issue Aug 24, 2022 · 0 comments
Open

Validation is broken in Rails 7 #18

5minpause opened this issue Aug 24, 2022 · 0 comments

Comments

@5minpause
Copy link

Since this commit rails/rails@70dc990
the code to add errors to the record doesn't work anymore.

Current code:

record.errors[attribute] << get_message(reason)

How it should work with Rails 7:

pc.weak_password_reasons.each do |reason|
  record.errors.add(attribute, get_message(reason))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant