diff options
| author | Teddy Wing | 2017-07-07 12:40:48 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2017-07-07 12:58:11 +0200 | 
| commit | c91a0c34d1218b67e5aaca96f1140734baf7b7ec (patch) | |
| tree | 526b2750b797863d601207b96aec875ff0648431 | |
| parent | 0aef1ec53b69a57e9eb5bd2f13f0c88438e668e4 (diff) | |
| download | chouette-core-c91a0c34d1218b67e5aaca96f1140734baf7b7ec.tar.bz2 | |
TableBuilderHelper::URL: Fix polymorphic URL for TimeTable
Had a problem on the TimeTables#index page where the #show and #edit
links in the gear menu would link to `/referentials/:id` instead of
`/referentials/:id/time_tables/:id`.
This turned out to be caused by a syntax bug in the condition that adds
the `Chouette::TimeTable` object to the polymorphic URL array. Now the
proper URL is rendered.
Refs #3479
| -rw-r--r-- | app/helpers/table_builder_helper/url.rb | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/app/helpers/table_builder_helper/url.rb b/app/helpers/table_builder_helper/url.rb index 894e5ddf8..0894df0fe 100644 --- a/app/helpers/table_builder_helper/url.rb +++ b/app/helpers/table_builder_helper/url.rb @@ -10,7 +10,7 @@ module TableBuilderHelper            polymorph_url << item.route.line if item.is_a?(Chouette::RoutingConstraintZone)            polymorph_url << item if item.respond_to? :line_referential            polymorph_url << item.stop_area if item.respond_to? :stop_area -          polymorph_url << item if item.respond_to? :stop_points || item.is_a?(Chouette::TimeTable) +          polymorph_url << item if item.respond_to?(:stop_points) || item.is_a?(Chouette::TimeTable)          elsif item.respond_to? :referential            polymorph_url << item.referential          end | 
