質問編集履歴
5
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -41,6 +41,18 @@
|
|
41
41
|
end
|
42
42
|
|
43
43
|
end
|
44
|
+
|
45
|
+
```
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
```model
|
50
|
+
|
51
|
+
def configure_permitted_parameters
|
52
|
+
|
53
|
+
devise_parameter_sanitizer.permit(:sign_up, keys: [:nickname, :accepted, :name, :approved, :Image])
|
54
|
+
|
55
|
+
end
|
44
56
|
|
45
57
|
```
|
46
58
|
|
4
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,7 +2,11 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
..File.read('./tmp/<@guider.Image>')の場合のエラー
|
6
|
+
|
5
7
|
![イメージ説明](e1b65d5eb5930b9266a605c80d4c55bc.png)
|
8
|
+
|
9
|
+
..File.read('./tmp/#{@guider.Image}')の場合のエラー
|
6
10
|
|
7
11
|
![イメージ説明](5a442ccacb4e4e20f5903e81d991d685.png)
|
8
12
|
|
3
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -42,6 +42,48 @@
|
|
42
42
|
|
43
43
|
|
44
44
|
|
45
|
+
registration
|
46
|
+
|
47
|
+
```view
|
48
|
+
|
49
|
+
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), :html => {:class => "new_guider1"}) do |f| %>
|
50
|
+
|
51
|
+
<%= devise_error_messages! %>
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
<div class="field">
|
56
|
+
|
57
|
+
<%= f.label :学生証 %><br />
|
58
|
+
|
59
|
+
<%= f.file_field :Image %>
|
60
|
+
|
61
|
+
</div>
|
62
|
+
|
63
|
+
<% end %>
|
64
|
+
|
65
|
+
```
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
```DB
|
70
|
+
|
71
|
+
class AddImageToGuiders < ActiveRecord::Migration
|
72
|
+
|
73
|
+
def change
|
74
|
+
|
75
|
+
add_column :guiders, :Image, :text
|
76
|
+
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
```
|
84
|
+
|
85
|
+
|
86
|
+
|
45
87
|
```view
|
46
88
|
|
47
89
|
<p><%= @guider.email %> has registered to join your site!</p>
|
2
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
![イメージ説明](e1b65d5eb5930b9266a605c80d4c55bc.png)
|
6
|
+
|
7
|
+
![イメージ説明](5a442ccacb4e4e20f5903e81d991d685.png)
|
6
8
|
|
7
9
|
|
8
10
|
|
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
今現在私は、actionmailer
|
1
|
+
今現在私は、actionmailerを使って、メールに画像を添付して送りたいと考えています。しかし、文字送信は可能ですが、画像は、うまく送れない状態にあります。もしわかる方がいらしたら、ご教授していただきたいです。
|
2
2
|
|
3
3
|
|
4
4
|
|
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
@guider = guider
|
22
22
|
|
23
|
-
attachments['@guider.Image'] = ..File.read('./tmp/<@guider.Image>')
|
23
|
+
** attachments['@guider.Image'] = ..File.read('./tmp/<@guider.Image>') **
|
24
24
|
|
25
25
|
mail(
|
26
26
|
|