diff options
| author | Teddy Wing | 2018-01-24 17:01:42 +0100 |
|---|---|---|
| committer | Zog | 2018-01-25 17:18:02 +0100 |
| commit | c02c597cfcd8d21c9bf59d41dbd312e9c26289b8 (patch) | |
| tree | ec76fa7f6bc7b43df03e764175d9b04abef2ac5a /app/controllers/purchase_windows_controller.rb | |
| parent | 5e41dbed021522331532eb0151ac441553be2d13 (diff) | |
| download | chouette-core-c02c597cfcd8d21c9bf59d41dbd312e9c26289b8.tar.bz2 | |
PurchaseWindowDecorator: Convert to new action links interface
Also add a new method `AF83::Decorator.define_instance_method`. Thanks
to Johan for suggesting that and walking me through writing it. This new
method allows us to define methods on the instance decorator. We need
this to preserve the `#bounding_dates` method that was defined in
`PurchaseWindowDecorator`.
Refs #5586
Diffstat (limited to 'app/controllers/purchase_windows_controller.rb')
| -rw-r--r-- | app/controllers/purchase_windows_controller.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/controllers/purchase_windows_controller.rb b/app/controllers/purchase_windows_controller.rb index 04b5736bb..293a7d8e4 100644 --- a/app/controllers/purchase_windows_controller.rb +++ b/app/controllers/purchase_windows_controller.rb @@ -36,13 +36,12 @@ class PurchaseWindowsController < ChouetteController end def decorate_purchase_windows(purchase_windows) - ModelDecorator.decorate( + PurchaseWindowDecorator.decorate( purchase_windows, - with: PurchaseWindowDecorator, context: { referential: @referential - } - ) + } + ) end def sort_column |
