Help us understand the problem. What is going on with this article?

私も画像が投稿できるWebアプリを作りたい。その4(最後)

1.ページに画像を投稿できるボタンを作るぞ。

要約 : newとeditのhtml.erbに↓を書く

app/views/posts/new.html.erbと
app/views/posts/edit.html.erbの
「form」の中に
↓を書く。

 <%= form.label :写真をアップするぞ %>
          ①
 <%= form.file_field :image %>
             ②

①「何をするのか名前を書いてあげる」と親切
②ページを見ると、写真をアップする画面になってます。

showは詳細画面

app/views/posts/show.html.erb
<%= image_tag, @post.image.url %>
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away