diff options
| author | Guillaume | 2017-11-28 17:34:01 +0100 | 
|---|---|---|
| committer | Guillaume | 2017-11-28 17:34:01 +0100 | 
| commit | 82f52c76f407d4f18699b4d4f0cc1c01275ca719 (patch) | |
| tree | 92a608a33ef61b6ffbdad6ec55e1827945c7f817 /app/models/chouette/network.rb | |
| parent | 9a8ddef8dbfec3ac656b0980a1614b8720e6a950 (diff) | |
| download | chouette-core-82f52c76f407d4f18699b4d4f0cc1c01275ca719.tar.bz2 | |
Refs #4824, #4825 fix wrong translate in lines, network, stop_area, enumerize for source_type_name, comments map display in stop_area form
Diffstat (limited to 'app/models/chouette/network.rb')
| -rw-r--r-- | app/models/chouette/network.rb | 13 | 
1 files changed, 12 insertions, 1 deletions
| diff --git a/app/models/chouette/network.rb b/app/models/chouette/network.rb index 3f07ebe0c..f0a79ec13 100644 --- a/app/models/chouette/network.rb +++ b/app/models/chouette/network.rb @@ -3,6 +3,7 @@ module Chouette      include NetworkRestrictions      include LineReferentialSupport      include ObjectidSupport +    extend Enumerize      # FIXME http://jira.codehaus.org/browse/JRUBY-6358      self.primary_key = "id" @@ -10,6 +11,16 @@ module Chouette      attr_accessor :source_type_name +    enumerize :source_type_name, in: %w(public_and_private_utilities +                                        road_authorities +                                        transit_operator +                                        public_transport +                                        passenger_transport_coordinating_authority +                                        travel_information_service_provider +                                        travel_agency +                                        individual_subject_of_travel_itinerary +                                        other_information) +      validates_format_of :registration_number, :with => %r{\A[0-9A-Za-z_-]+\Z}, :allow_nil => true, :allow_blank => true      validates_presence_of :name @@ -47,4 +58,4 @@ module Chouette    end -end
\ No newline at end of file +end | 
