How to set a dynamic attribute
I believe that you're looking for the following:
dest_table.send(:"#{col}=", xyz)
You can try
dest_table.write_attribute(col, xyz)
OR
dest_table[col] = xyz
OR
dest_table.send("#{col}=", xyz)
I believe that you're looking for the following:
dest_table.send(:"#{col}=", xyz)
You can try
dest_table.write_attribute(col, xyz)
OR
dest_table[col] = xyz
OR
dest_table.send("#{col}=", xyz)