diff options
| author | Alban Peignier | 2016-09-10 16:36:14 +0200 |
|---|---|---|
| committer | Alban Peignier | 2016-09-10 16:36:14 +0200 |
| commit | dd300bbeae39ec67f0dc811b17720b03263bac20 (patch) | |
| tree | 26f6d101e79c40a670a87facbbc1b9ce94ae2b2f | |
| parent | e616e9ff5e2e6dbee3ae8c0ed95087ed6f548877 (diff) | |
| download | chouette-core-dd300bbeae39ec67f0dc811b17720b03263bac20.tar.bz2 | |
Define Line#line_referential when built into ReferentialLinesController. Refs #841
| -rw-r--r-- | app/controllers/referential_lines_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/referential_lines_controller.rb b/app/controllers/referential_lines_controller.rb index 7112cf452..a566f440e 100644 --- a/app/controllers/referential_lines_controller.rb +++ b/app/controllers/referential_lines_controller.rb @@ -50,6 +50,12 @@ class ReferentialLinesController < ChouetteController protected + def build_resource + super.tap do |resource| + resource.line_referential = referential.line_referential + end + end + def filtered_lines_maps filtered_lines.collect do |line| { :id => line.id, :name => (line.published_name ? line.published_name : line.name) } |
