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

activemodel: ActiveModel::Errors#add accepts String and Proc for type #717

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Nov 10, 2024

  1. Configuration menu
    Copy the full SHA
    34e19fc View commit details
    Browse the repository at this point in the history
  2. fix(activemodel): ActiveModel::Errors#add accepts String and Proc for…

    … type
    
    The behavior of passing String or Proc for type should be allowed.
    
    FYI: It is documented in 6.1, but It is already available in 6.0.
    
    cf. rails/rails@fcd1e41#diff-4deafad6fefcf6aa6626a1f7e3cd0ca1cf95e358f55a10a69e02be84d926bb31R368-R374
    
    cf. rails/rails@d9011e3#diff-4deafad6fefcf6aa6626a1f7e3cd0ca1cf95e358f55a10a69e02be84d926bb31R370
    
    Also, the name of the second argument was changed from `message` to `type` in 6.1.
    sanfrecce-osaka committed Nov 10, 2024
    Configuration menu
    Copy the full SHA
    fe5bb2d View commit details
    Browse the repository at this point in the history