質問編集履歴
1
pp>views>devise>registrations>new\.html\.erbを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -140,6 +140,88 @@
|
|
140
140
|
|
141
141
|
|
142
142
|
|
143
|
+
###app>views>devise>registrations>new.html.erb
|
144
|
+
|
145
|
+
```ruby
|
146
|
+
|
147
|
+
<h2>ユーザー登録</h2>
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
152
|
+
|
153
|
+
<%= devise_error_messages! %>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
<div class="field">
|
158
|
+
|
159
|
+
<%= f.label :username %><br />
|
160
|
+
|
161
|
+
<%= f.text_field :username, autofocus: true %>
|
162
|
+
|
163
|
+
</div>
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
<div class="field">
|
168
|
+
|
169
|
+
<%= f.label :email %><br />
|
170
|
+
|
171
|
+
<%= f.email_field :email %>
|
172
|
+
|
173
|
+
</div>
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
<div class="field">
|
178
|
+
|
179
|
+
<%= f.label :password %>
|
180
|
+
|
181
|
+
<% if @minimum_password_length %>
|
182
|
+
|
183
|
+
<em>(<%= @minimum_password_length %> characters minimum)</em>
|
184
|
+
|
185
|
+
<% end %><br />
|
186
|
+
|
187
|
+
<%= f.password_field :password, autocomplete: "off" %>
|
188
|
+
|
189
|
+
</div>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
<div class="field">
|
194
|
+
|
195
|
+
<%= f.label :password_confirmation %><br />
|
196
|
+
|
197
|
+
<%= f.password_field :password_confirmation, autocomplete: "off" %>
|
198
|
+
|
199
|
+
</div>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
<div class="actions">
|
204
|
+
|
205
|
+
<%= f.submit "Sign up" %>
|
206
|
+
|
207
|
+
</div>
|
208
|
+
|
209
|
+
<% end %>
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<%= render "devise/shared/links" %>
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
```
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
143
225
|
###補足情報(言語/FW/ツール等のバージョンなど)
|
144
226
|
|
145
227
|
下記のサイトを参照しました。
|