質問編集履歴
2
表記変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,7 +14,11 @@
|
|
14
14
|
|
15
15
|
|
16
16
|
|
17
|
+
|
18
|
+
|
19
|
+
#####アプリケーションビュー
|
20
|
+
|
17
|
-
```
|
21
|
+
```
|
18
22
|
|
19
23
|
<%= form_with url: posts_search_path, method: :get, local: true do |f| %>
|
20
24
|
|
@@ -30,7 +34,9 @@
|
|
30
34
|
|
31
35
|
|
32
36
|
|
33
|
-
|
37
|
+
######モデル
|
38
|
+
|
39
|
+
```
|
34
40
|
|
35
41
|
def self.search(search)
|
36
42
|
|
@@ -48,9 +54,9 @@
|
|
48
54
|
|
49
55
|
```
|
50
56
|
|
57
|
+
######コントローラー
|
51
58
|
|
52
|
-
|
53
|
-
```
|
59
|
+
```
|
54
60
|
|
55
61
|
def search
|
56
62
|
|
@@ -60,7 +66,7 @@
|
|
60
66
|
|
61
67
|
```
|
62
68
|
|
63
|
-
|
69
|
+
######searuchビュー
|
64
70
|
|
65
71
|
```html
|
66
72
|
|
1
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -64,11 +64,25 @@
|
|
64
64
|
|
65
65
|
```html
|
66
66
|
|
67
|
-
|
67
|
+
<ul><% @posts.each do |post| %>
|
68
68
|
|
69
|
-
|
69
|
+
<li>
|
70
70
|
|
71
|
+
<%= link_to post.title, post %>
|
72
|
+
|
73
|
+
<%= post.created_at %>
|
74
|
+
|
75
|
+
<%= post.item_name %>
|
76
|
+
|
77
|
+
</li>
|
78
|
+
|
79
|
+
<%= link_to "編集",edit_post_path(post) %>
|
80
|
+
|
81
|
+
<%= link_to "削除",post, method: :delete %>
|
82
|
+
|
71
|
-
end
|
83
|
+
<% end %>
|
84
|
+
|
85
|
+
</ul>
|
72
86
|
|
73
87
|
```
|
74
88
|
|