Open marcelolx opened 3 weeks ago
Huh, I see. It's possible we want to generate the method based on ActiveRecord::Base::primary_key
.
Probably to support composite primary keys as well, which are an Array.
Would "def #{label} = find(#{record.id.inspect})"
solve the interpolation here? That'll keep integers plain, wrap UUID strings in quotes, and should handle array keys sanely as well (unless the composite key has eg. a Date column included).
Something like this is needed, otherwise it won't pass the UUID as a string to
find