The key is assigned to the method name, name.var by default but will be re-assigned to column_name.id if declared, which is the name of the column in the database, not the name of the method.
We need to use the method name and not the column_name, hence the change from {{name.id}} to {{settings["crystal_variable_name"]}}
Description
COLUMNS
key for declaring instance variables, which is assigned as follows:https://github.com/anykeyh/clear/blob/3bdaa44a7d0382fd8f6846afe8b8da95d58d9452/src/clear/model/modules/has_columns.cr#L174
The key is assigned to the method name,
name.var
by default but will be re-assigned tocolumn_name.id
if declared, which is the name of the column in the database, not the name of the method.We need to use the method name and not the column_name, hence the change from
{{name.id}}
to{{settings["crystal_variable_name"]}}
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist:
bin/ameba
ran without alert.