Posts_controller.rb
Class —
def index
@post = Post.find(1)
end
End
Index.html.erb
<%= @post.content %>
contentはレコード名
変数@postの中(idの1)のcontentカラムのデータ表示してください
Index.html.erb
<%= @post.content %>
<%= @post.created_at %>
変数@postの中(idの1)のcontentカラムと作成日カラムのデータを表示してください