diff options
| author | Teddy Wing | 2017-07-07 11:42:26 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-07-07 12:58:11 +0200 |
| commit | 0aef1ec53b69a57e9eb5bd2f13f0c88438e668e4 (patch) | |
| tree | 96fe7c7b69971e9d6a45e60830d77cf5cdcbc95f /app/controllers/time_tables_controller.rb | |
| parent | 2fc961ec6661442971c783587efdeddc4344b55c (diff) | |
| download | chouette-core-0aef1ec53b69a57e9eb5bd2f13f0c88438e668e4.tar.bz2 | |
TimeTables#index: Use new table builder helper
Additionally convert the `#human_attribute_name` calls to call it on the
class because this is more correct and because that method doesn't exist
on the decorated collection of `@time_tables`.
TODO: There's a bug here where the #show and #edit links don't link
correctly, they go to `/referentials/:id` instead of
`/referentials/:id/time_tables/:id`.
Refs #3479
Diffstat (limited to 'app/controllers/time_tables_controller.rb')
| -rw-r--r-- | app/controllers/time_tables_controller.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/time_tables_controller.rb b/app/controllers/time_tables_controller.rb index 0e0cade56..f23e4c201 100644 --- a/app/controllers/time_tables_controller.rb +++ b/app/controllers/time_tables_controller.rb @@ -85,6 +85,15 @@ class TimeTablesController < ChouetteController if collection.out_of_bounds? redirect_to params.merge(:page => 1) end + + @time_tables = ModelDecorator.decorate( + @time_tables, + with: TimeTableDecorator, + context: { + referential: @referential + } + ) + build_breadcrumb :index } end |
