Skip to content
  • Ryuta Kamizono's avatar
    47a6d788
    Fix numericality validator to still use value before type cast except Active Record · 47a6d788
    Ryuta Kamizono authored
    The purpose of fe9547b6 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 #33651.
    Fixes #33686.
    47a6d788
    Fix numericality validator to still use value before type cast except Active Record
    Ryuta Kamizono authored
    The purpose of fe9547b6 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 #33651.
    Fixes #33686.
Loading