teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

view全体の追加

2019/10/02 06:24

投稿

Junya421
Junya421

スコア11

title CHANGED
File without changes
body CHANGED
@@ -14,8 +14,29 @@
14
14
 
15
15
  ### 該当のソースコード
16
16
 
17
- view
17
+ view index
18
18
  ```ruby
19
+ <% provide(:title, 'All users') %>
20
+ <h1>All microposts</h1>
21
+
22
+ <h2>検索</h2>
23
+ <%= form_tag microposts_path, :method => 'get' do %>
24
+ <p>
25
+ <%= text_field_tag :search, params[:search] %>
26
+ <%= submit_tag "Search", :name => nil %>
27
+ </p>
28
+ <% end %>
29
+
30
+
31
+ <%= paginate @microposts %>
32
+ <ul class="microposts">
33
+ <%= render @microposts %>
34
+
35
+
36
+ </ul>
37
+ ```
38
+ view render
39
+ ```ruby
19
40
  <%= form_for(@micropost, url: micropost_path(@micropost), html: {method: "patch"}) %>
20
41
 
21
42