回答編集履歴
2
シンプルに書く例を追加
answer
CHANGED
@@ -9,4 +9,11 @@
|
|
9
9
|
```lang-ruby
|
10
10
|
@todos = Todo.where("exhibitor = ? OR proprietor = ?",'current_user', 'current_user')
|
11
11
|
```
|
12
|
-
のようにすれば問題ないかと思います。
|
12
|
+
のようにすれば問題ないかと思います。
|
13
|
+
|
14
|
+
以下のようにしてシンプルにすることもできます。
|
15
|
+
|
16
|
+
```lang-ruby
|
17
|
+
user = 'current_user'
|
18
|
+
@todos = Todo.where("exhibitor = ? OR proprietor = ?",user , user)
|
19
|
+
```
|
1
不要なカンマを削除
answer
CHANGED
@@ -7,6 +7,6 @@
|
|
7
7
|
```
|
8
8
|
↓
|
9
9
|
```lang-ruby
|
10
|
-
@todos = Todo.where("exhibitor = ? OR proprietor = ?",'current_user', 'current_user'
|
10
|
+
@todos = Todo.where("exhibitor = ? OR proprietor = ?",'current_user', 'current_user')
|
11
11
|
```
|
12
12
|
のようにすれば問題ないかと思います。
|