Skip to content

Putting integer fields in config.case_insensitive_keys unsets them during update/validation #5780

Description

@benlieb

This took me 1 hour to debug:

[2] pry(main)> u = User.first
[5] pry(main)> u.valid?
=> false
[6] pry(main)> u.changes
=> {"site_id"=>[12, nil]}
[7] pry(main)>

I was able to trace it back to here:

config.case_insensitive_keys = %i[email, site_id]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions