質問編集履歴
2
コードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -39,3 +39,69 @@
|
|
39
39
|
</div>
|
40
40
|
|
41
41
|
<% end %>
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
aplication.html.erb
|
46
|
+
|
47
|
+
<!DOCTYPE html>
|
48
|
+
|
49
|
+
<html>
|
50
|
+
|
51
|
+
<head>
|
52
|
+
|
53
|
+
<title>Miniblog</title>
|
54
|
+
|
55
|
+
<%= csrf_meta_tags %>
|
56
|
+
|
57
|
+
<%= csp_meta_tag %>
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
62
|
+
|
63
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
64
|
+
|
65
|
+
</head>
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<body>
|
70
|
+
|
71
|
+
<header>
|
72
|
+
|
73
|
+
<div class="header_bar">
|
74
|
+
|
75
|
+
<h1 class="grid-6"><a href="/">Blog</a></h1>
|
76
|
+
|
77
|
+
<ul class="nav">
|
78
|
+
|
79
|
+
<% if user_signed_in? %>
|
80
|
+
|
81
|
+
<%= link_to "New", new_blog_path %>
|
82
|
+
|
83
|
+
<%= link_to "SingOut", destroy_user_session_path, method: :delete %>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
<% else %>
|
88
|
+
|
89
|
+
<%= link_to "Login", new_user_session_path %>
|
90
|
+
|
91
|
+
<%= link_to "SingUp", new_user_registration_path %>
|
92
|
+
|
93
|
+
<% end %>
|
94
|
+
|
95
|
+
</ul>
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
</div>
|
100
|
+
|
101
|
+
</header>
|
102
|
+
|
103
|
+
<%= yield %>
|
104
|
+
|
105
|
+
</body>
|
106
|
+
|
107
|
+
</html>
|
1
コードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,3 +1,41 @@
|
|
1
1
|
ruby on rails -v 5.2.1![イメージ説明](8b6b192fa161a5cbcbb2ee1f2ff06c1b.png)
|
2
2
|
|
3
3
|
画像の一番下の部分に投稿したもののidやtitleなどが出てきてしまうのですが消す方法はありますか?
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
index.html.erb
|
8
|
+
|
9
|
+
<%= @blogs.each do |blog|%>
|
10
|
+
|
11
|
+
<div class="posts">
|
12
|
+
|
13
|
+
<h1><%= blog.title %></h1>
|
14
|
+
|
15
|
+
<p><%= blog.text %></p>
|
16
|
+
|
17
|
+
<ul class="btn">
|
18
|
+
|
19
|
+
<li>
|
20
|
+
|
21
|
+
<%= link_to "Show", blog_path(blog.id) %>
|
22
|
+
|
23
|
+
</li>
|
24
|
+
|
25
|
+
<li>
|
26
|
+
|
27
|
+
<%= link_to "Edit",edit_blog_path(blog)%>
|
28
|
+
|
29
|
+
</li>
|
30
|
+
|
31
|
+
<li>
|
32
|
+
|
33
|
+
<%= link_to "Delete", destroy_user_session_path, method: :delete %>
|
34
|
+
|
35
|
+
</li>
|
36
|
+
|
37
|
+
</ul>
|
38
|
+
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<% end %>
|