`_id` Omitted from Customized Fields
tubbo opened this issue · 0 comments
tubbo commented
Describe the bug
Any customized fields ending in _id
will have the _id
omitted from their instance variable name, which causes issues if that name conflicts with an ivar or method that already exists.
To Reproduce
Steps to reproduce the behavior:
- Add a customized field called
:product_id
- Create your customizations with
MyCustomizations.new('1234', 'product_id' => '5678')
- Call
customizations.product_id
, it will be "1234".
Expected behavior
Since the product_id
param overrides the @product_id
assigned by the first argument, the value of #product_id
in the customization object should be "5678". Digging in reveals that the value of "5678" was actually assigned to @product
, not @product_id
.
Workarea Setup (please complete the following information):
Workarea v3.4
Additional context
This was originally reported by John Varady on discourse.