diff options
| author | Vlatka Pavisic | 2017-04-11 15:35:01 +0200 | 
|---|---|---|
| committer | Vlatka Pavisic | 2017-04-11 15:35:01 +0200 | 
| commit | aa481c087b162bc775b4418e205f91c5b6bead19 (patch) | |
| tree | 914ba9b39e0338317bcc2bfd839f745647beda1a /app/helpers/newapplication_helper.rb | |
| parent | 8adf909694b52959483818bf839d6e180015eb99 (diff) | |
| download | chouette-core-aa481c087b162bc775b4418e205f91c5b6bead19.tar.bz2 | |
Refs #3047: Associate RoutingConstraintZone with StopPoints
Diffstat (limited to 'app/helpers/newapplication_helper.rb')
| -rw-r--r-- | app/helpers/newapplication_helper.rb | 10 | 
1 files changed, 4 insertions, 6 deletions
| diff --git a/app/helpers/newapplication_helper.rb b/app/helpers/newapplication_helper.rb index c4b8ee7ab..f5b898731 100644 --- a/app/helpers/newapplication_helper.rb +++ b/app/helpers/newapplication_helper.rb @@ -51,12 +51,11 @@ module NewapplicationHelper              if attribute == 'name'                lnk = [] -              unless item.class.to_s == 'Calendar' or item.class.to_s == 'Referential' +              unless item.class == Calendar or item.class == Referential                  if current_referential                    lnk << current_referential                    lnk << item.line if item.respond_to? :line -                  lnk << item.route.line if item.class.to_s == 'Chouette::RoutingConstraintZone' -                  lnk << item if item.class.to_s == 'Chouette::RoutingConstraintZone' +                  lnk << item.route.line if item.class == Chouette::RoutingConstraintZone                    lnk << item if item.respond_to? :line_referential                    lnk << item.stop_area if item.respond_to? :stop_area                    lnk << item if item.respond_to? :stop_points @@ -103,12 +102,11 @@ module NewapplicationHelper            polymorph_url << action          end -        unless item.class.to_s == 'Calendar' or item.class.to_s == 'Referential' +        unless item.class == Calendar or item.class == Referential            if current_referential              polymorph_url << current_referential              polymorph_url << item.line if item.respond_to? :line -            polymorph_url << item.route.line if item.class.to_s == 'Chouette::RoutingConstraintZone' -            polymorph_url << item if item.class.to_s == 'Chouette::RoutingConstraintZone' +            polymorph_url << item.route.line if item.class == 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 | 
