Commit 5c847a1
committed
Refactor MergeableOrdersFinder
Changes the MergeableOrdersFinder interface to accept a single `context:`
parameter instead of individual `user:`, `store:`, and `current_order:`
parameters.
Changes include:
- Update MergeableOrdersFinder to extract user/store/order from context
- Modify set_current_order to pass `context: self` to finder
- Update documentation examples to reflect new context-based interface
- Refactor specs to use context doubles with spree_current_user
- Add frontend_viewable filter to maintain existing behavior
Signed-off-by: Thukten Singye <[email protected]>1 parent c9fdc95 commit 5c847a1
File tree
4 files changed
+25
-32
lines changed- core
- app
- helpers/spree/core/controller_helpers
- models/spree
- spec/models/spree
4 files changed
+25
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 45 | + | |
50 | 46 | | |
51 | 47 | | |
52 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
| 39 | + | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | | - | |
444 | 443 | | |
445 | 444 | | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
| 445 | + | |
| 446 | + | |
452 | 447 | | |
453 | 448 | | |
| 449 | + | |
| 450 | + | |
454 | 451 | | |
455 | 452 | | |
456 | 453 | | |
| |||
0 commit comments