質問編集履歴
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -31,3 +31,23 @@
|
|
31
31
|
参考になりそうなものがなくこちらで質問させていただきました。
|
32
32
|
|
33
33
|
よろしくお願いいたします。
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
### 追記
|
38
|
+
|
39
|
+
下記コードで場合分けすることでエラー等は出なくなりました。
|
40
|
+
|
41
|
+
```
|
42
|
+
|
43
|
+
<% if @user.profile_image.attached? %>
|
44
|
+
|
45
|
+
<%= image_tag @user.profile_image, class:"border border-secondary rounded-circle border-0", size:"75x75" if @user.profile_image.attached? %>
|
46
|
+
|
47
|
+
<% else %>
|
48
|
+
|
49
|
+
<%= image_tag "no_image.jpg" %>
|
50
|
+
|
51
|
+
<% end %>
|
52
|
+
|
53
|
+
```
|