質問編集履歴
1
ソースの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -32,4 +32,55 @@
|
|
32
32
|
|
33
33
|
どこにも「users_path」なんて書いてないんです。
|
34
34
|
どういうことなのでしょうか。。。
|
35
|
-
ご教授願います。
|
35
|
+
ご教授願います。
|
36
|
+
|
37
|
+
|
38
|
+
以下がbundle exec rake routesの結果です
|
39
|
+
```
|
40
|
+
Prefix Verb URI Pattern Controller#Action
|
41
|
+
user_new GET /user/new(.:format) user#new
|
42
|
+
root GET / satic_pages#home
|
43
|
+
help GET /help(.:format) satic_pages#help
|
44
|
+
about GET /about(.:format) satic_pages#about
|
45
|
+
contact GET /contact(.:format) satic_pages#contact
|
46
|
+
signup GET /signup(.:format) user#new
|
47
|
+
user_index GET /user(.:format) user#index
|
48
|
+
POST /user(.:format) user#create
|
49
|
+
new_user GET /user/new(.:format) user#new
|
50
|
+
edit_user GET /user/:id/edit(.:format) user#edit
|
51
|
+
user GET /user/:id(.:format) user#show
|
52
|
+
PATCH /user/:id(.:format) user#update
|
53
|
+
PUT /user/:id(.:format) user#update
|
54
|
+
DELETE /user/:id(.:format) user#destroy
|
55
|
+
```
|
56
|
+
|
57
|
+
次がapp/view/user/new.html.erbです
|
58
|
+
```ここに言語を入力
|
59
|
+
<% provide(:title,'Sign up') %>
|
60
|
+
<h1>新規登録</h1>
|
61
|
+
<p>新しくアカウントつくるとこやで。</p>
|
62
|
+
|
63
|
+
<div class="row">
|
64
|
+
<div class="col-md-6 col-md-offset-3">
|
65
|
+
<%= form_for(@user) do |f| %>
|
66
|
+
<%= render 'shared/error_messages' %>
|
67
|
+
|
68
|
+
<%= f.label :name %>
|
69
|
+
<%= f.text_field :name, class: 'form-control' %>
|
70
|
+
|
71
|
+
<%= f.label :email %>
|
72
|
+
<%= f.email_field :email, class: 'form-control' %>
|
73
|
+
|
74
|
+
<%= f.label :password %>
|
75
|
+
<%= f.password_field :password, class: 'form-control' %>
|
76
|
+
|
77
|
+
<%= f.label :password_confirmation, "Confirmation" %>
|
78
|
+
<%= f.password_field :password_confirmation, class: 'form-control' %>
|
79
|
+
|
80
|
+
<%= f.submit "Create my account", class: "btn btn-primary" %>
|
81
|
+
<% end %>
|
82
|
+
</div>
|
83
|
+
</div>
|
84
|
+
```
|
85
|
+
|
86
|
+
お願いします。
|