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

Fix numericality validator to still use value before type cast except Active Record #33654

Merged
merged 1 commit into from Aug 28, 2018

Commits on Aug 23, 2018

  1. Fix numericality validator to still use value before type cast except…

    … Active Record
    
    The purpose of fe9547b is to work type casting to value from database.
    
    But that was caused not to use the value before type cast even except
    Active Record.
    
    There we never guarantees that the value before type cast was going to
    the used in this validation, but we should not change the behavior
    unless there is some particular reason.
    
    To restore original behavior, still use the value before type cast if
    `came_from_user?` is undefined (i.e. except Active Record).
    
    Fixes rails#33651.
    Fixes rails#33686.
    kamipo committed Aug 23, 2018
    Configuration menu
    Copy the full SHA
    47a6d78 View commit details
    Browse the repository at this point in the history