質問編集履歴

5

修正

2019/01/25 19:54

投稿

avicii
avicii

スコア49

test CHANGED
File without changes
test CHANGED
@@ -48,18 +48,14 @@
48
48
 
49
49
  ```model
50
50
 
51
- def self.search(search)
51
+ def self.search(search1, search2)
52
52
 
53
- if search
53
+ if search1 && search2
54
54
 
55
- Plan.where("(datetimes like ?) AND (title like ?)", "%#{params[:search1]}%", "%#{params[:search2]}%")
55
+ Plan.where("(datetimes like ?) AND (title like ?)", "%#{search1}%", "%#{search2}%")
56
56
 
57
- else
57
+  end
58
58
 
59
- Plan.all
60
-
61
- end
59
+ end
62
-
63
- end
64
60
 
65
61
  ```

4

変更

2019/01/25 19:54

投稿

avicii
avicii

スコア49

test CHANGED
@@ -1 +1 @@
1
- 複合条件での検索結果が出てこない
1
+ 複合条件での検索結果が出てこない状態になってます。
test CHANGED
File without changes

3

たいとル変更

2019/01/10 20:04

投稿

avicii
avicii

スコア49

test CHANGED
@@ -1 +1 @@
1
- 複合条件を利用した検索を行なっているですが、検索が出てこない状態になっている。
1
+ 複合条件の検索結果が出てこない
test CHANGED
File without changes

2

タイトル変更

2019/01/10 19:55

投稿

avicii
avicii

スコア49

test CHANGED
@@ -1 +1 @@
1
- 複合条件検索を実装しているのですが、二つのカラム重なる条件が出てこない
1
+ 複合条件を利用した検索を行なっているのですが、検索が出てこない状態になっている。
test CHANGED
File without changes

1

修正確認

2019/01/10 19:53

投稿

avicii
avicii

スコア49

test CHANGED
File without changes
test CHANGED
File without changes