質問編集履歴

4

a

2016/03/28 10:17

投稿

k.m.m.m
k.m.m.m

スコア77

test CHANGED
File without changes
test CHANGED
@@ -120,6 +120,196 @@
120
120
 
121
121
 
122
122
 
123
+ routes.rb
124
+
125
+ ```lang-言語名
126
+
127
+ Rails.application.routes.draw do
128
+
129
+ root 'home#index'
130
+
131
+
132
+
133
+ devise_for :teachers, :controllers => {
134
+
135
+ :sessions => "teachers/sessions",
136
+
137
+ :registrations => "teachers/registrations",
138
+
139
+ :passwords => "teachers/passwords",
140
+
141
+ # :omniauth_callbacks => "teachers/omniauth_callbacks"
142
+
143
+ }
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+ devise_for :students, :controllers => {
152
+
153
+ :sessions => "students/sessions",
154
+
155
+ :registrations => "students/registrations",
156
+
157
+ :passwords => "students/passwords",
158
+
159
+ # :omniauth_callbacks => "students/omniauth_callbacks"
160
+
161
+ }
162
+
163
+
164
+
165
+
166
+
167
+ resources :teachers, only: [:show, :index] do
168
+
169
+ resources :evaluations, only: [:index]
170
+
171
+ end
172
+
173
+
174
+
175
+ get 'evaluation' => evaluations#evaluation', as:'evaluation'
176
+
177
+ post 'evaluation' => 'evaluations#evaluation'
178
+
179
+ delete 'unevaluation/:teacher_id' => 'evaluations#unevaluation'
180
+
181
+
182
+
183
+
184
+
185
+ # The priority is based upon order of creation: first created -> highest priori
186
+
187
+ ty.
188
+
189
+ # See how all your routes lay out with "rake routes".
190
+
191
+
192
+
193
+ # You can have the root of your site routed with "root"
194
+
195
+ # root 'welcome#index'
196
+
197
+
198
+
199
+ # Example of regular route:
200
+
201
+ # get 'products/:id' => 'catalog#view'
202
+
203
+
204
+
205
+ # Example of named route that can be invoked with purchase_url(id: product.id)
206
+
207
+ # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
208
+
209
+
210
+
211
+ # Example resource route (maps HTTP verbs to controller actions automatically):
212
+
213
+ # resources :products
214
+
215
+
216
+
217
+ # Example resource route with options:
218
+
219
+ # resources :products do
220
+
221
+ # member do
222
+
223
+ # get 'short'
224
+
225
+ # post 'toggle'
226
+
227
+ # end
228
+
229
+ #
230
+
231
+ # collection do
232
+
233
+ # get 'sold'
234
+
235
+ # end
236
+
237
+ # end
238
+
239
+
240
+
241
+ # Example resource route with sub-resources:
242
+
243
+ # resources :products do
244
+
245
+ # resources :comments, :sales
246
+
247
+ # resource :seller
248
+
249
+ # end
250
+
251
+
252
+
253
+ # Example resource route with more complex sub-resources:
254
+
255
+ # resources :products do
256
+
257
+ # resources :comments
258
+
259
+ # resources :sales do
260
+
261
+ # get 'recent', on: :collection
262
+
263
+ # end
264
+
265
+ # end
266
+
267
+
268
+
269
+ # Example resource route with concerns:
270
+
271
+ # concern :toggleable do
272
+
273
+ # post 'toggle'
274
+
275
+ # end
276
+
277
+ # resources :posts, concerns: :toggleable
278
+
279
+ # resources :photos, concerns: :toggleable
280
+
281
+
282
+
283
+ # Example resource route within a namespace:
284
+
285
+ # namespace :admin do
286
+
287
+ # # Directs /admin/products/* to Admin::ProductsController
288
+
289
+ # # (app/controllers/admin/products_controller.rb)
290
+
291
+ # resources :products
292
+
293
+ # end
294
+
295
+ end
296
+
297
+
298
+
299
+ ```
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
123
313
 
124
314
 
125
315
  strong parametersの記述をコメントアウトすると、

3

2016/03/28 10:17

投稿

k.m.m.m
k.m.m.m

スコア77

test CHANGED
File without changes
test CHANGED
@@ -139,3 +139,23 @@
139
139
  というエラーが表示されます。
140
140
 
141
141
  たくさんググっても解決策が見当たらなかったので分かる方教えて欲しいです。
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ ググったサイト
150
+
151
+ http://nograve.hatenadiary.jp/entry/2015/11/05/161948
152
+
153
+
154
+
155
+ http://hbnist76.blog.fc2.com/blog-entry-424.html
156
+
157
+
158
+
159
+
160
+
161
+ http://ja.stackoverflow.com/questions/399/rails4%E3%81%A7%E3%82%B3%E3%83%B3%E3%83%88%E3%83%AD%E3%83%BC%E3%83%A9%E3%83%BC%E3%81%AEpost%E3%82%A2%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AE%E3%83%86%E3%82%B9%E3%83%88%E3%82%92%E3%81%97%E3%81%9F%E3%81%84%E3%81%8C-actioncontrollerparametermissing-%E3%81%AE%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%A7%E3%83%86%E3%82%B9%E3%83%88%E3%81%A7%E3%81%8D%E3%81%AA

2

2016/03/26 05:23

投稿

k.m.m.m
k.m.m.m

スコア77

test CHANGED
@@ -1 +1 @@
1
- rails でstrong parametersについてのエラー
1
+ rails でレビューを実装したいのですがform作成でエラーが出ます。
test CHANGED
File without changes

1

2016/03/25 10:47

投稿

k.m.m.m
k.m.m.m

スコア77

test CHANGED
File without changes
test CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- evaluationsカラムにフォームで値を送信しようと思っているのです
5
+ evaluationsテーブルにフォームで値を送信しようと思っているのです
6
6
 
7
7
  が、evaluations_controller.rbのstrong parametersを作成すると
8
8