回答編集履歴
2
idにしてみる
test
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
|
5
5
|
```Ruby
|
6
6
|
|
7
|
-
User.where.not(
|
7
|
+
User.where.not(id: current_user.id).order("RAND()").first
|
8
8
|
|
9
9
|
```
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
Userのカラムが"id"でなければ、適当に変えてみて下さい。
|
1
Rubyだよ
test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
```
|
5
|
+
```Ruby
|
6
6
|
|
7
7
|
User.where.not(user_id: current_user.id).order("RAND()").first
|
8
8
|
|