*_attribute methods take String or Symbol

This commit is contained in:
Dylan Knutson
2025-07-19 05:13:14 +00:00
parent 42d3ce97d9
commit 6ba5a70bb5
2 changed files with 9 additions and 1 deletions

View File

@@ -241,7 +241,7 @@ module HasAuxTable
method = self.instance_method(method_name)
self.define_method(method_name) do |name, *args, **kwargs, &block|
T.bind(self, ActiveRecord::Base)
if config.aux.column_names.include?(name)
if config.aux.column_names.include?(name.to_s)
target = config.aux_model_for(self)
T.unsafe(target).send(method_name, name, *args, **kwargs, &block)
else