質問するログイン新規登録

質問編集履歴

1

pp>views>devise>registrations>new\.html\.erbを追記

2016/02/12 16:22

投稿

Tomoaki_Fukuda
Tomoaki_Fukuda

スコア75

title CHANGED
File without changes
body CHANGED
@@ -69,6 +69,47 @@
69
69
 
70
70
  ```
71
71
 
72
+ ###app>views>devise>registrations>new.html.erb
73
+ ```ruby
74
+ <h2>ユーザー登録</h2>
75
+
76
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
77
+ <%= devise_error_messages! %>
78
+
79
+ <div class="field">
80
+ <%= f.label :username %><br />
81
+ <%= f.text_field :username, autofocus: true %>
82
+ </div>
83
+
84
+ <div class="field">
85
+ <%= f.label :email %><br />
86
+ <%= f.email_field :email %>
87
+ </div>
88
+
89
+ <div class="field">
90
+ <%= f.label :password %>
91
+ <% if @minimum_password_length %>
92
+ <em>(<%= @minimum_password_length %> characters minimum)</em>
93
+ <% end %><br />
94
+ <%= f.password_field :password, autocomplete: "off" %>
95
+ </div>
96
+
97
+ <div class="field">
98
+ <%= f.label :password_confirmation %><br />
99
+ <%= f.password_field :password_confirmation, autocomplete: "off" %>
100
+ </div>
101
+
102
+ <div class="actions">
103
+ <%= f.submit "Sign up" %>
104
+ </div>
105
+ <% end %>
106
+
107
+ <%= render "devise/shared/links" %>
108
+
109
+ ```
110
+
111
+
112
+
72
113
  ###補足情報(言語/FW/ツール等のバージョンなど)
73
114
  下記のサイトを参照しました。
74
115
  http://ruby-rails.hatenadiary.com/entry/20140804/1407168000