質問編集履歴

4

質問の追加情報

2022/09/26 12:09

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -65,3 +65,21 @@
65
65
 
66
66
  deviseの使用が今回初めてなのでこれがテンプレートになっていて変更できないということでしょうか?
67
67
  教えて頂けたら幸いです。
68
+
69
+ !追加
70
+ 調べるとapplication_controllerに追加を許可する必要があると知り、記入したのですが、
71
+ それでも表示されませんでした
72
+ application_controller
73
+ ```
74
+ class ApplicationController < ActionController::Base
75
+ protect_from_forgery with: :exception
76
+ before_action :configure_permitted_parameters, if: :devise_controller?
77
+
78
+ protected
79
+
80
+ def configure_permitted_parameters
81
+ added_attrs = [ :name, :email, :password, :furiganaName, :telephone_number, :address, :post_code]
82
+ devise_parameter_sanitizer.permit :sign_up, keys: added_attrs
83
+ end
84
+ end
85
+ ```

3

修正後のコード

2022/09/26 11:53

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -14,12 +14,12 @@
14
14
 
15
15
  <div class="field">
16
16
  <%= f.label :name %><br />
17
- <%= f.email_field :name, autofocus: true, autocomplete: "name" %>
17
+ <%= f.name_field :name, autofocus: true, autocomplete: "name" %>
18
18
  </div>
19
19
 
20
20
  <div class="field">
21
21
  <%= f.label :furiganaName %><br />
22
- <%= f.email_field :furiganaName, autofocus: true, autocomplete: "furiganaName" %>
22
+ <%= f.furiganaName_field :furiganaName, autofocus: true, autocomplete: "furiganaName" %>
23
23
  </div>
24
24
 
25
25
  <div class="field">
@@ -29,22 +29,17 @@
29
29
 
30
30
  <div class="field">
31
31
  <%= f.label :post_code %><br />
32
- <%= f.email_field :post_code, autofocus: true, autocomplete: "post_code" %>
32
+ <%= f.post_code_field :post_code, autofocus: true, autocomplete: "post_code" %>
33
33
  </div>
34
34
 
35
35
  <div class="field">
36
36
  <%= f.label :address %><br />
37
- <%= f.email_field :address, autofocus: true, autocomplete: "address" %>
37
+ <%= f.address_field :address, autofocus: true, autocomplete: "address" %>
38
- </div>
39
-
40
- <div class="field">
41
- <%= f.label :email %><br />
42
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
43
38
  </div>
44
39
 
45
40
  <div class="field">
46
41
  <%= f.label :telephone_number %><br />
47
- <%= f.email_field :telephone_number, autofocus: true, autocomplete: "telephone_number" %>
42
+ <%= f.telephone_number_field :telephone_number, autofocus: true, autocomplete: "telephone_number" %>
48
43
  </div>
49
44
 
50
45
  <div class="field">

2

質問のタイトルを分かりやすく

2022/09/26 09:26

投稿

退会済みユーザー
test CHANGED
@@ -1 +1 @@
1
- deviseの会員登録ページの編集が反映されない
1
+ deviseの会員登録ページのviewが反映されない
test CHANGED
File without changes

1

質問の誤字脱字の修正

2022/09/26 09:07

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,5 @@
1
1
  devise userで会員登録そしてログイン機能を作成している最中でviewページの変種ができません。
2
- 会員登録時にEメールやパスワードのほかに住所や電話番号などの記入欄も作成したのですが、
2
+ 会員登録時にEメールやパスワードのほかに住所や電話番号などの記入欄も作成したのですが、それが反映されません。
3
- それが反映されません。
4
3
  もともと編集することは不可能なのでしょうか?
5
4
 
6
5
  写真