Commit bba2f03
committed
feat(products): support search_term on product index endpoint
## Context
The product catalog list in the app exposes a search box, and the
ProductsQuery already supports a search_term (ransacking name and code).
The REST index action did not forward it, so the endpoint could not be
filtered.
## Description
Pass params[:search_term] from the products index action to ProductsQuery,
matching the convention used by the other V1 index endpoints.1 parent f66bb66 commit bba2f03
2 files changed
Lines changed: 21 additions & 0 deletions
File tree
- app/controllers/api/v1
- spec/requests/api/v1
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
132 | 152 | | |
133 | 153 | | |
134 | 154 | | |
| |||
0 commit comments