Closed 4ndypanda closed 1 month ago
Hey @nashby, when you get a chance, can you please take a look at this bug fix as well? I think @4ndypanda might need to resolve a conflict, but it looks otherwise good to go!
Note to self, rebase after merging https://github.com/brainspec/enumerize/pull/450.
@4ndypanda thanks! I pushed a small change https://github.com/brainspec/enumerize/commit/c77d0e3af8069f6d259f362ad779680baa09aa01 since Attribute#name
is always a symbol.
Ensures Enumerize is agnostic to whether the key to a store accessor is a string or symbol.
Re-opening https://github.com/brainspec/enumerize/pull/405 but with fix to not generate string objects with
#to_s
from original PR. Because ActiveRecord::Store's.store
and.store_accessor
methods allow string names for attribute names, we should be able to handle them. This has come up for me when dealing with meta-programming where one dynamically defines store attributes.