Although it is easy, we have created an inventory registration and management application as a personal application.
Currently, even if you use the each statement, the contents of the column cannot be displayed and an error occurs.
Also, as a problem isolation, if you remove the column where the error occurs, the error does not occur, but is it an instance variable instead of the column contents? Is the situation that comes out.
Details are described below. Thanks for your help.

[Error screen] (https://gyazo.com/99bdae95ec208a20d071cbf5483361ce)
Corresponding source code
Controller (https://gyazo.com/bbf38a74d76eaf7f9d9383669d9fdec9)
routes (https://gyazo.com/7fec2b2e593a2fb32af155c363ed11b0)
view (https://gyazo.com/8003a098fd9febbc5f48b504c92fbfd3)
If necessary, we will provide everything else.
What I tried

I'm angry with the code column for some reason, so if I remove the display in the code column
Remove display of code column
And since it seems that the vol column can not be displayed, remove the display in the vol column
vol column remove
The error no longer occurs, but it feels like where it came from.
For the time being, I will leave the contents of Sequel Pro

Supplementary information (FW/tool version, etc.)

Ruby version

  • Answer # 1

    @itemsIs not directly tied to the value in each column, as it is plural. It is a block parameteritemPlease collect the value from.