Skip to content

cast values to Enumerize::Value, filter invalid values on multiple#476

Open
HoneyryderChuck wants to merge 1 commit into
brainspec:masterfrom
persona-id:fix-type-cast
Open

cast values to Enumerize::Value, filter invalid values on multiple#476
HoneyryderChuck wants to merge 1 commit into
brainspec:masterfrom
persona-id:fix-type-cast

Conversation

@HoneyryderChuck
Copy link
Copy Markdown

this regression was caught while upgrading an application to rails 7.2, where activemodel with set the attributes API before enumerize is loaded, which makes the callback chain work differently when the model is assigned raw values which pass through
type.cast(value_before_type_cast), making it return the raw value, which can't respond to Enumerize::Value predication methods.

this regression was caught while upgrading an application to rails 7.2,
where activemodel with set the attributes API before enumerize is
loaded, which makes the callback chain work differently when the model
is assigned raw values which pass through
`type.cast(value_before_type_cast)`, making it return the raw value,
which can't respond to Enumerize::Value predication methods.
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

Successfully merging this pull request may close these issues.

1 participant