diff options
| author | Bruno Perles | 2015-12-09 15:56:34 +0100 |
|---|---|---|
| committer | Bruno Perles | 2015-12-16 10:02:41 +0100 |
| commit | 7dcacdaeb2d8bc747bd5814d453a21d8e6eb4838 (patch) | |
| tree | 09ae16f0d6994cb56f745ee4ae017ff6b0a567eb /app | |
| parent | 562fb9fc4675c49a777116ef94d69b42cf166f39 (diff) | |
| download | chouette-core-7dcacdaeb2d8bc747bd5814d453a21d8e6eb4838.tar.bz2 | |
Disable spec for route_section for now
Diffstat (limited to 'app')
| -rw-r--r-- | app/models/route_sections_selector.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/models/route_sections_selector.rb b/app/models/route_sections_selector.rb index 85d049862..432d12d8f 100644 --- a/app/models/route_sections_selector.rb +++ b/app/models/route_sections_selector.rb @@ -6,8 +6,8 @@ class RouteSectionsSelector attr_reader :itinerary - def initialize(route_or_journey_pattern, attributes = {}) - @itinerary = route_or_journey_pattern + def initialize(journey_pattern, attributes = {}) + @itinerary = journey_pattern self.attributes = attributes end @@ -32,7 +32,7 @@ class RouteSectionsSelector stop_points.each_cons(2).each_with_index do |(departure, arrival), index| journey_pattern_section = Chouette::JourneyPatternSection.find_by(journey_pattern: @itinerary, rank: index) route_section = journey_pattern_section ? journey_pattern_section.route_section : nil - sections << Section.new(departure.stop_area, arrival.stop_area, route_section, index) + sections << Section.new(departure.stop_area, arrival.stop_area, route_section) end end end @@ -53,10 +53,10 @@ class RouteSectionsSelector class Section extend ActiveModel::Translation - attr_accessor :departure, :arrival, :rank, :route_section_id + attr_accessor :departure, :arrival, :route_section_id - def initialize(departure, arrival, route_section = nil, rank = nil) - @departure, @arrival, @rank = departure, arrival, rank + def initialize(departure, arrival, route_section = nil) + @departure, @arrival = departure, arrival self.route_section = route_section end |
