Skip to content

Make AM::AttributeSet::YAMLEncoder a Module#56734

Merged
skipkayhil merged 1 commit intorails:mainfrom
Shopify:hm-knsstxkworyzusqv
Feb 4, 2026
Merged

Make AM::AttributeSet::YAMLEncoder a Module#56734
skipkayhil merged 1 commit intorails:mainfrom
Shopify:hm-knsstxkworyzusqv

Conversation

@hmcguire-shopify
Copy link
Contributor

It's usefulness as a class is storing a model's default_types, but those are cached in an instance variable on the model's class anyways. Making it a Module means less objects (zero vs one per table), and we don't have to ensure its cleared if the schema is reloaded.

It's usefulness as a class is storing a model's `default_types`, but
those are cached in an instance variable on the model's class anyways.
Making it a Module means less objects (zero vs one per table), and we
don't have to ensure its cleared if the schema is reloaded.
@skipkayhil skipkayhil merged commit cf83dda into rails:main Feb 4, 2026
4 checks passed
@hmcguire-shopify hmcguire-shopify deleted the hm-knsstxkworyzusqv branch February 5, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants