質問編集履歴

2

文字修正

2017/07/03 07:03

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
 
14
14
 
15
- # 質問詳細
15
+ # うまくいくケース
16
16
 
17
17
 
18
18
 
@@ -46,7 +46,7 @@
46
46
 
47
47
 
48
48
 
49
-
49
+ ルートについて紆余曲折をへて
50
50
 
51
51
 
52
52
 
@@ -54,7 +54,7 @@
54
54
 
55
55
 
56
56
 
57
- class Host::Mypages::EventsController < Host::Base
57
+ class Host::EventsController < Host::Base
58
58
 
59
59
 
60
60
 
@@ -120,10 +120,42 @@
120
120
 
121
121
 
122
122
 
123
+
124
+
125
+ # ここから個人的直感(エラーになる)
126
+
127
+
128
+
123
129
  一方**個人的な直感**の、
124
130
 
125
131
 
126
132
 
133
+ ```app/controllers/host/mypages/events_controller.rb
134
+
135
+
136
+
137
+ class Host::Mypages::EventsController < Host::Base ←Mypagesを追加
138
+
139
+
140
+
141
+ def new
142
+
143
+ end
144
+
145
+
146
+
147
+ end
148
+
149
+
150
+
151
+ ```
152
+
153
+
154
+
155
+ Viewは
156
+
157
+
158
+
127
159
  ```
128
160
 
129
161
 
@@ -146,29 +178,27 @@
146
178
 
147
179
 
148
180
 
149
- は**エラーになります。**エラー内容は...
150
-
151
-
152
-
153
- ```
154
-
155
-
156
-
157
- Host::EventsController#new is missing a template for this request format and variant.
158
-
159
-
160
-
161
- request.formats: ["text/html"]
162
-
163
- request.variant: []
164
-
165
-
166
-
167
- NOTE! For XHR/Ajax or API requests, this action would normally respond with 204 No Content: an empty white screen. Since you're loading it in a web browser, we assume that you expected to actually render a template, not nothing, so we're showing an error to be extra-clear. If you expect 204 No Content, carry on. That's what you'll get from an XHR or API request. Give it a shot.
168
-
169
-
170
-
171
- ```
181
+ そして
182
+
183
+
184
+
185
+ ``````
186
+
187
+
188
+
189
+ http://0.0.0.0:3000/host/mypage/events/new
190
+
191
+
192
+
193
+
194
+
195
+ ```
196
+
197
+
198
+
199
+ にアクセスすると**エラーになりました。**
200
+
201
+ (エラー内容を控えられなかったので、時間をおいて掲載できたらします!)
172
202
 
173
203
 
174
204
 

1

タイトル修正

2017/07/03 07:03

投稿

退会済みユーザー
test CHANGED
@@ -1 +1 @@
1
- 【Rails】namespaceとresourceとresourcesのネストについて
1
+ 【Rails】namespaceとresourceとresourcesのルートネストについて
test CHANGED
File without changes