質問編集履歴
2
添付の画像とindex.htmlを修正しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
1前提・実現したいこと
|
2
2
|
現在の画面
|
3
|
-
[画面](https://gyazo.com/
|
3
|
+
[画面](https://gyazo.com/3e44526c4ef2c9263261dca0a13bf5a1)
|
4
|
-
非ログイン時にprototypeのタイトルをクリックすると
|
4
|
+
非ログイン時にprototype(下から2行目のaaaaaaやaaaです、わかりにくてすいません)のタイトルをクリックすると
|
5
5
|
その詳細ページに移動したい
|
6
6
|
|
7
7
|
2発生している問題・エラーメッセージ
|
@@ -122,7 +122,7 @@
|
|
122
122
|
<% if user_signed_in? %>
|
123
123
|
<div class="greeting">
|
124
124
|
<%= "こんにちは" %>
|
125
|
-
<%= link_to "#{current_user.name}", user_path(
|
125
|
+
<%= link_to "#{current_user.name}", user_path(current.user), class: :greeting__link %>
|
126
126
|
<%# <%= link_to "#{current_user.name}", user_registration_path, class: :greeting__link %>
|
127
127
|
</div>
|
128
128
|
<% else %>
|
@@ -139,6 +139,7 @@
|
|
139
139
|
</div>
|
140
140
|
</div>
|
141
141
|
</main>
|
142
|
+
|
142
143
|
```
|
143
144
|
app/views/users/show.html.erb
|
144
145
|
```html
|
1
codeの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -293,4 +293,21 @@
|
|
293
293
|
# end
|
294
294
|
|
295
295
|
end
|
296
|
+
```
|
297
|
+
app/views/prototypes/_prototype.html.erb
|
298
|
+
```html
|
299
|
+
<div class="card">
|
300
|
+
<%= image_tag prototype.image, class: 'card__img' if prototype.image.attached? %>
|
301
|
+
<div class="card__body">
|
302
|
+
<%= link_to prototype.catct_copy, prototype_path(prototype.id), method: :get, class: :card__title%>
|
303
|
+
<p class="card__summary">
|
304
|
+
<%= prototype.concept %>
|
305
|
+
</p>
|
306
|
+
<% if current_user %>
|
307
|
+
<%= link_to "by#{prototype.user.name}", user_path(current_user), method: :get, class: :card__user %>
|
308
|
+
<% end %>
|
309
|
+
</div>
|
310
|
+
</div>
|
311
|
+
|
312
|
+
|
296
313
|
```
|