質問編集履歴
8
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,51 +14,7 @@
|
|
14
14
|
|
15
15
|
```view
|
16
16
|
|
17
|
-
|
17
|
+
<%= form.file_field :images, multiple: true %>
|
18
|
-
|
19
|
-
<%= file_field_tag 'copy_image' %>
|
20
|
-
|
21
|
-
<%= file_field_tag 'second_image' %>
|
22
|
-
|
23
|
-
<%= file_field_tag 'third_image' %>
|
24
|
-
|
25
|
-
<%= file_field_tag 'fourth_image' %>
|
26
|
-
|
27
|
-
<%= file_field_tag 'five_image' %>
|
28
|
-
|
29
|
-
```
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
```view
|
34
|
-
|
35
|
-
<div class="main">
|
36
|
-
|
37
|
-
<i class="fas fa-chevron-circle-left" aria-hidden="true" id="prev"></i>
|
38
|
-
|
39
|
-
<img src="<%= @plan.image %>" id="target" style="width: 950px; height: 400px; padding-bottom: 15px; padding-top: 20px; ">
|
40
|
-
|
41
|
-
<i class="fas fa-chevron-circle-right" aria-hidden="true" id="next"></i>
|
42
|
-
|
43
|
-
</div>
|
44
|
-
|
45
|
-
<div class="king">
|
46
|
-
|
47
|
-
<ul class="example">
|
48
|
-
|
49
|
-
<li class="current"><img src="<%= @plan.copy_image %>" style=" width: 185px; height: 123px;"></li>
|
50
|
-
|
51
|
-
<li><img src="<%= @plan.second_image %>" style="width: 185px; height: 123px;"></li>
|
52
|
-
|
53
|
-
<li><img src="<%= @plan.third_image %>" style="width: 185px; height: 123px;"></li>
|
54
|
-
|
55
|
-
<li><img src="<%= @plan.fourth_image %>" style="width: 185px; height: 123px;"></li>
|
56
|
-
|
57
|
-
<li><img src="<%= @plan.five_image %>" style="width: 185px; height: 123px;"></li>
|
58
|
-
|
59
|
-
</ul>
|
60
|
-
|
61
|
-
</div>
|
62
18
|
|
63
19
|
```
|
64
20
|
|
@@ -66,17 +22,13 @@
|
|
66
22
|
|
67
23
|
```model
|
68
24
|
|
69
|
-
|
25
|
+
class Article < ActiveRecord::Base
|
70
26
|
|
71
|
-
mount_uploader :
|
27
|
+
mount_uploaders :images, ImageUploader
|
72
28
|
|
73
|
-
|
29
|
+
serialize :images, JSON
|
74
30
|
|
75
|
-
mount_uploader :third_image, ImageUploader
|
76
|
-
|
77
|
-
mount_uploader :fourth_image, ImageUploader
|
78
|
-
|
79
|
-
|
31
|
+
end
|
80
32
|
|
81
33
|
```
|
82
34
|
|
@@ -84,10 +36,6 @@
|
|
84
36
|
|
85
37
|
```controller
|
86
38
|
|
87
|
-
|
88
|
-
|
89
|
-
Plan.create(place: params[:place], image: params[:image], copy_image: params[:copy_image], second_image: params[:second_image], third_image: params[:third_image], fourth_image: params[:fourth_image], five_image: params[:five_image], title: params[:title], contents: params[:contents], times: params[:times], datetimes: params[:datetimes], guider_id: current_guider.id)
|
90
|
-
|
91
|
-
end
|
39
|
+
params.require(:article).permit(:title, :body, {images: []})
|
92
40
|
|
93
41
|
```
|
7
修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
複数の画像を一つのファイルでアップロードしたいが、できない状態になってます。
|
1
|
+
複数の画像を一つのファイル選択ダイアログでアップロードしたいが、できない状態になってます。
|
test
CHANGED
File without changes
|
6
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,7 +2,13 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
複数
|
6
|
+
|
5
7
|
![イメージ説明](f7c6e5facdaf0a62d77faa334520fd96.png)
|
8
|
+
|
9
|
+
1つ
|
10
|
+
|
11
|
+
![イメージ説明](5996ac5c1260c4762682a76b074a27bc.png)
|
6
12
|
|
7
13
|
|
8
14
|
|
5
修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
複数の画像を一つのファイルでアップロードしたいが、
|
1
|
+
複数の画像を一つのファイルでアップロードしたいが、できない状態になってます。
|
test
CHANGED
File without changes
|
4
変更
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
3
変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
-
```view
|
9
|
+
```view
|
10
10
|
|
11
11
|
<%= file_field_tag 'image' %>
|
12
12
|
|
@@ -19,6 +19,40 @@
|
|
19
19
|
<%= file_field_tag 'fourth_image' %>
|
20
20
|
|
21
21
|
<%= file_field_tag 'five_image' %>
|
22
|
+
|
23
|
+
```
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
```view
|
28
|
+
|
29
|
+
<div class="main">
|
30
|
+
|
31
|
+
<i class="fas fa-chevron-circle-left" aria-hidden="true" id="prev"></i>
|
32
|
+
|
33
|
+
<img src="<%= @plan.image %>" id="target" style="width: 950px; height: 400px; padding-bottom: 15px; padding-top: 20px; ">
|
34
|
+
|
35
|
+
<i class="fas fa-chevron-circle-right" aria-hidden="true" id="next"></i>
|
36
|
+
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div class="king">
|
40
|
+
|
41
|
+
<ul class="example">
|
42
|
+
|
43
|
+
<li class="current"><img src="<%= @plan.copy_image %>" style=" width: 185px; height: 123px;"></li>
|
44
|
+
|
45
|
+
<li><img src="<%= @plan.second_image %>" style="width: 185px; height: 123px;"></li>
|
46
|
+
|
47
|
+
<li><img src="<%= @plan.third_image %>" style="width: 185px; height: 123px;"></li>
|
48
|
+
|
49
|
+
<li><img src="<%= @plan.fourth_image %>" style="width: 185px; height: 123px;"></li>
|
50
|
+
|
51
|
+
<li><img src="<%= @plan.five_image %>" style="width: 185px; height: 123px;"></li>
|
52
|
+
|
53
|
+
</ul>
|
54
|
+
|
55
|
+
</div>
|
22
56
|
|
23
57
|
```
|
24
58
|
|
@@ -51,37 +85,3 @@
|
|
51
85
|
end
|
52
86
|
|
53
87
|
```
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
```view show
|
58
|
-
|
59
|
-
<div class="main">
|
60
|
-
|
61
|
-
<i class="fas fa-chevron-circle-left" aria-hidden="true" id="prev"></i>
|
62
|
-
|
63
|
-
<img src="<%= @plan.image %>" id="target" style="width: 950px; height: 400px; padding-bottom: 15px; padding-top: 20px; ">
|
64
|
-
|
65
|
-
<i class="fas fa-chevron-circle-right" aria-hidden="true" id="next"></i>
|
66
|
-
|
67
|
-
</div>
|
68
|
-
|
69
|
-
<div class="king">
|
70
|
-
|
71
|
-
<ul class="example">
|
72
|
-
|
73
|
-
<li class="current"><img src="<%= @plan.copy_image %>" style=" width: 185px; height: 123px;"></li>
|
74
|
-
|
75
|
-
<li><img src="<%= @plan.second_image %>" style="width: 185px; height: 123px;"></li>
|
76
|
-
|
77
|
-
<li><img src="<%= @plan.third_image %>" style="width: 185px; height: 123px;"></li>
|
78
|
-
|
79
|
-
<li><img src="<%= @plan.fourth_image %>" style="width: 185px; height: 123px;"></li>
|
80
|
-
|
81
|
-
<li><img src="<%= @plan.five_image %>" style="width: 185px; height: 123px;"></li>
|
82
|
-
|
83
|
-
</ul>
|
84
|
-
|
85
|
-
</div>
|
86
|
-
|
87
|
-
```
|
2
修正確認
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
1
修正確認
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
複数の画像を一つのファイルで
|
1
|
+
複数の画像を一つのファイルでアップロードしたいが、、
|
test
CHANGED
File without changes
|