質問編集履歴

1

Userモデルについて追記

2015/04/22 00:20

投稿

noppefoxwolf
noppefoxwolf

スコア231

test CHANGED
File without changes
test CHANGED
@@ -89,3 +89,29 @@
89
89
 
90
90
 
91
91
  上手く説明出来ているか分からないのですが是非解説頂けると幸いです。
92
+
93
+
94
+
95
+
96
+
97
+ ##追記
98
+
99
+ Userモデル
100
+
101
+ ```lang-ruby
102
+
103
+ class User < ActiveRecord::Base
104
+
105
+ has_many :friendships,
106
+
107
+ dependent: :destroy
108
+
109
+ has_many :friends,
110
+
111
+ through: :friendships
112
+
113
+ end
114
+
115
+
116
+
117
+ ```