質問編集履歴
3
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -32,4 +32,12 @@
|
|
32
32
|
<% end %>
|
33
33
|
|
34
34
|
当方、Railsの初心者です。
|
35
|
-
何卒宜しくお願い致します。
|
35
|
+
何卒宜しくお願い致します。
|
36
|
+
|
37
|
+
**追記**
|
38
|
+
question.rb
|
39
|
+
has_many :categories, dependent: :destroy
|
40
|
+
accepts_nested_attributes_for :categories
|
41
|
+
|
42
|
+
has_many :languages, dependent: :destroy
|
43
|
+
accepts_nested_attributes_for :languages
|
2
タグを追記
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
1
ActiveRecord追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
**Railsの
|
1
|
+
**RailsのActiveRecordで3つのテーブルを結合するやり方を教えてください。**
|
2
2
|
|
3
3
|
**やりたい事**
|
4
4
|
eager_loadやjoinを用いて下記3つのモデル(テーブル)から全ての値を取得し、ビューのeachメソッドで使用したいです。
|