回答編集履歴
1
情報追加
answer
CHANGED
@@ -15,4 +15,11 @@
|
|
15
15
|
とすると
|
16
16
|
params[:teacher][:places_attributes] に id が入ってくるかと。
|
17
17
|
|
18
|
-
Teacher modelでaccepts_nested_attributes_for の定義が必要です
|
18
|
+
Teacher modelでaccepts_nested_attributes_for の定義が必要です
|
19
|
+
|
20
|
+
#追記
|
21
|
+
設問を読み違えてました、すみません。validationがうまく行かないんですね。
|
22
|
+
validates :place_ids, presence: true
|
23
|
+
この書き方は初めてみました。有るのかな。。
|
24
|
+
validates :teachers_places, presence: true
|
25
|
+
としてみるとどうでしょう
|