显示来自Ruby表的数据

我是Ruby的新手,我正在尝试从表中获取数据。 所以看完这个

 I have this this result. [#] 

所以当我调用Note.text(例如)时,我得到了nil结果。 那么我应该在这里写什么来从数组中获取数据? 谢谢

@note是一个带有一个Note对象的数组。 你需要先获得元素。 例如:

 <%= @note.first.text %> 

你是一个数组的反向记录,所以你需要像这样调用

  <%= puts @note.first.text %> 

要么

  <%= puts @note.last.text %> if there is only one record 

但是你没有指定你是如何回溯记录的..