diff options
| author | Teddy Wing | 2018-01-25 12:46:45 +0100 |
|---|---|---|
| committer | Teddy Wing | 2018-01-25 12:46:45 +0100 |
| commit | c9a844e840c8ac47efda4cdeff1ccca66d96c7e6 (patch) | |
| tree | 459604bfde30a120db10319b718376dd4c5eeaa1 | |
| parent | 24cbe3fabaa5fba19780c86bd7754f023f82c8e5 (diff) | |
| download | chouette-core-c9a844e840c8ac47efda4cdeff1ccca66d96c7e6.tar.bz2 | |
ImportDecorator: Fix `#import_status_css_class`
When I converted this decorator to use the new action links interface, I
inadvertently broke this decorated method. This caused the
http://stif-boiv.dev:3000/workbenches/1/imports/1 page to break. Fix it
by using the `define_instance_method` in `AF83::Decorator`.
Refs #5586
| -rw-r--r-- | app/decorators/import_decorator.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/decorators/import_decorator.rb b/app/decorators/import_decorator.rb index a9192e8f9..c6b1f2349 100644 --- a/app/decorators/import_decorator.rb +++ b/app/decorators/import_decorator.rb @@ -1,7 +1,7 @@ class ImportDecorator < AF83::Decorator decorates Import - def import_status_css_class + define_instance_method :import_status_css_class do cls ='' cls = 'overheaded-success' if object.status == 'successful' cls = 'overheaded-warning' if object.status == 'warning' |
