Skip to content

Allow sting values for permitted classes for YAML::dump - #810

Open
dima4p wants to merge 1 commit into
ruby:masterfrom
dima4p:master
Open

Allow sting values for permitted classes for YAML::dump#810
dima4p wants to merge 1 commit into
ruby:masterfrom
dima4p:master

Conversation

@dima4p

@dima4p dima4p commented Aug 2, 2026

Copy link
Copy Markdown

In Rails console the command reload! creates new ActveRecord classes and they are not equal to the ones set in ActiveRecord.yaml_column_permitted_classes= at the initializaton time.
Therefore it is needed to list them there not as classes but as String containing the name of a class.
In the case of YAML.load this works but in the case of YAML.dump it does not.
This PR fixes the issue.

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