【发布时间】:2016-08-03 22:28:28
【问题描述】:
我一直在阅读第 2 章,进展顺利,只是他要求读者向用户展示第一个微博,这似乎很简单。可以看章节here。
在我的show.html.erb 中,我添加了以下几行:
<p id="notice"><%= notice %></p>
<p>
<strong>Name:</strong>
<%= @user.name %>
</p>
<p>
<strong>Email:</strong>
<%= @user.email %>
</p
<p>
<strong>Post:</strong>
<%= @user.microposts.first %>
</p>
<%= link_to 'Edit', edi<p id="notice"><%= notice %></p>
但我在 /users/1 看到的只是“帖子:#”。
知道我做错了什么吗?
谢谢。
【问题讨论】:
标签: ruby-on-rails ruby