diff options
| author | Teddy Wing | 2017-06-14 19:10:59 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-06-14 19:10:59 +0200 |
| commit | 83d4edea80186c933ea83797f9fa49e24ec07fd4 (patch) | |
| tree | 0d40b0799efa1175adfc3a75bd595604dd38814a | |
| parent | 37ad0d2f30f8e16207b6123d9084b8f2cec3b592 (diff) | |
| download | chouette-core-83d4edea80186c933ea83797f9fa49e24ec07fd4.tar.bz2 | |
ReferentialsController#show: Use short syntax to decorate @referential
I hadn't used this syntax before because I think I had tried:
@referential.decorate
without the assignment. Of course it didn't work at the time, but I
didn't notice so I switched to this syntax which did work.
Use the shorter one because it's a bit cleaner.
Refs #3479
| -rw-r--r-- | app/controllers/referentials_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb index 50b2e47c6..e95670241 100644 --- a/app/controllers/referentials_controller.rb +++ b/app/controllers/referentials_controller.rb @@ -26,7 +26,7 @@ class ReferentialsController < BreadcrumbController def show resource.switch show! do |format| - @referential = ReferentialDecorator.new(@referential) + @referential = @referential.decorate format.json { render :json => { :lines_count => resource.lines.count, |
