diff options
| author | Alban Peignier | 2018-03-30 10:46:30 +0200 |
|---|---|---|
| committer | GitHub | 2018-03-30 10:46:30 +0200 |
| commit | b381eb1844b869958282bccf4f0a2f55ac0d12d0 (patch) | |
| tree | f9b3eed8ff1ad2c240397086247d47bc9b39358d | |
| parent | ddf9807fd2e5e0ec26011051f63fda87c6c1f2f6 (diff) | |
| parent | 0b3aab39c4c3bb6afb46443e5469c8c475d21331 (diff) | |
| download | chouette-core-b381eb1844b869958282bccf4f0a2f55ac0d12d0.tar.bz2 | |
Merge pull request #427 from af83/6340-exporter-flatten-services
Update simple_exporter. Refs #6340
| -rw-r--r-- | app/models/simple_exporter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/simple_exporter.rb b/app/models/simple_exporter.rb index c267b5b8c..1fcb76a29 100644 --- a/app/models/simple_exporter.rb +++ b/app/models/simple_exporter.rb @@ -64,7 +64,7 @@ class SimpleExporter < SimpleInterface def map_item_to_rows item return [item] unless configuration.item_to_rows_mapping - configuration.item_to_rows_mapping.call(item).map {|row| row.is_a?(ActiveRecord::Base) ? row : CustomRow.new(row) } + instance_exec(item, &configuration.item_to_rows_mapping).map {|row| row.is_a?(ActiveRecord::Base) ? row : CustomRow.new(row) } end def resolve_value item, col |
