diff options
| author | cedricnjanga | 2017-11-16 16:44:37 +0100 | 
|---|---|---|
| committer | cedricnjanga | 2017-11-22 12:41:57 +0100 | 
| commit | 31db1bba72800bddfa5dc9db4419ba95178dc4ff (patch) | |
| tree | e6bfb60e0f20ae71d3153fcc9a84be7b9680eb68 /app/models/chouette/journey_pattern.rb | |
| parent | 7c032665a81d9b81f6267d9bb133e8f0ec3b9e21 (diff) | |
| download | chouette-core-31db1bba72800bddfa5dc9db4419ba95178dc4ff.tar.bz2 | |
Add Cédric new objectid concerns
objectid_support handles reading and writing object_ids
objectid_formater_support gets the right formater class
include these concerns in chouette models
Remove StifNetexAttributSupport modules because these are handled by the new objectid concerns
Add a objectid and formater classes for each format type
Add objectid formats to the factories
Modify somes specs for object_ids but there are still a number of failling tests
Diffstat (limited to 'app/models/chouette/journey_pattern.rb')
| -rw-r--r-- | app/models/chouette/journey_pattern.rb | 34 | 
1 files changed, 0 insertions, 34 deletions
| diff --git a/app/models/chouette/journey_pattern.rb b/app/models/chouette/journey_pattern.rb index dce674791..797b6adb1 100644 --- a/app/models/chouette/journey_pattern.rb +++ b/app/models/chouette/journey_pattern.rb @@ -146,39 +146,5 @@ module Chouette          vjas.destroy        end      end - -    def control_route_sections -      stop_area_ids = self.stop_points.map(&:stop_area_id) -      control_route_sections_by_stop_areas(stop_area_ids) -    end - -    def control_route_sections_by_stop_areas(stop_area_ids) -      journey_pattern_section_all -      i = 0 -      to_control = false -      stop_area_ids.each_cons(2) do |a| -        jps = @route_sections_orders[i] -        i += 1 -        unless jps -          to_control = true -          next -        end -        unless [jps.route_section.departure.id, jps.route_section.arrival.id] == a -          jps.destroy -          to_control = true -        end -      end -      self.control_checked = true -      to_control ? self.control! : self.completed! -    end - -    protected - -    def journey_pattern_section_all -      @route_sections_orders = {} -      self.journey_pattern_sections.all.map do |journey_pattern_section| -        @route_sections_orders[journey_pattern_section.rank] = journey_pattern_section -      end -    end    end  end | 
