diff options
| author | Luc Donnet | 2018-04-10 17:30:55 +0200 | 
|---|---|---|
| committer | GitHub | 2018-04-10 17:30:55 +0200 | 
| commit | 537a5078657ead0b89aa5220c05dfbc01ae94dca (patch) | |
| tree | 54072303cdbab71e6005e7fc5c2af6db6a4f9d0b /app/models/chouette | |
| parent | dad504f5794a36be8dac97a257cdecd87704763b (diff) | |
| parent | 22e7844c1d2392e2a651a33bf83c32664a879619 (diff) | |
| download | chouette-core-537a5078657ead0b89aa5220c05dfbc01ae94dca.tar.bz2 | |
Merge pull request #438 from af83/6368-gtfs-import
GTFS import (first step)
Diffstat (limited to 'app/models/chouette')
| -rw-r--r-- | app/models/chouette/company.rb | 2 | ||||
| -rw-r--r-- | app/models/chouette/line.rb | 2 | ||||
| -rw-r--r-- | app/models/chouette/stop_area.rb | 2 | 
3 files changed, 3 insertions, 3 deletions
| diff --git a/app/models/chouette/company.rb b/app/models/chouette/company.rb index cb2266a3d..9d5737a6c 100644 --- a/app/models/chouette/company.rb +++ b/app/models/chouette/company.rb @@ -9,7 +9,7 @@ module Chouette      has_many :lines -    validates_format_of :registration_number, :with => %r{\A[0-9A-Za-z_-]+\Z}, :allow_nil => true, :allow_blank => true +    # validates_format_of :registration_number, :with => %r{\A[0-9A-Za-z_-]+\Z}, :allow_nil => true, :allow_blank => true      validates_presence_of :name      validates_format_of :url, :with => %r{\Ahttps?:\/\/([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?\Z}, :allow_nil => true, :allow_blank => true diff --git a/app/models/chouette/line.rb b/app/models/chouette/line.rb index 51851fc2e..4b5d1a68d 100644 --- a/app/models/chouette/line.rb +++ b/app/models/chouette/line.rb @@ -29,7 +29,7 @@ module Chouette      # validates_presence_of :network      # validates_presence_of :company -    validates_format_of :registration_number, :with => %r{\A[\d\w_\-]+\Z}, :allow_nil => true, :allow_blank => true +    # validates_format_of :registration_number, :with => %r{\A[\d\w_\-]+\Z}, :allow_nil => true, :allow_blank => true      validates_format_of :stable_id, :with => %r{\A[\d\w_\-]+\Z}, :allow_nil => true, :allow_blank => true      validates_format_of :url, :with => %r{\Ahttps?:\/\/([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?\Z}, :allow_nil => true, :allow_blank => true      validates_format_of :color, :with => %r{\A[0-9a-fA-F]{6}\Z}, :allow_nil => true, :allow_blank => true diff --git a/app/models/chouette/stop_area.rb b/app/models/chouette/stop_area.rb index 9f28b7ee6..4ddc7403b 100644 --- a/app/models/chouette/stop_area.rb +++ b/app/models/chouette/stop_area.rb @@ -33,7 +33,7 @@ module Chouette      after_update :journey_patterns_control_route_sections,                  if: Proc.new { |stop_area| ['boarding_position', 'quay'].include? stop_area.stop_area_type } -    validates_format_of :registration_number, :with => %r{\A[\d\w_\-]+\Z}, :allow_blank => true +    # validates_format_of :registration_number, :with => %r{\A[\d\w_:\-]+\Z}, :allow_blank => true      validates_presence_of :name      validates_presence_of :kind      validates_presence_of :latitude, :if => :longitude | 
