aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcedricnjanga2017-09-29 15:35:27 +0200
committercedricnjanga2017-09-29 16:44:31 +0200
commit04618f6079aabca0d8e5464bc8c1701c15a593fa (patch)
tree4b1b676fe43caae04d7085bafedd0f1b1c2bdc28
parent4764d2cdc34e44a0040115b99e8984aea5a6b569 (diff)
downloadchouette-core-04618f6079aabca0d8e5464bc8c1701c15a593fa.tar.bz2
Refs #4517 Add module to deal with transport mode and submode
-rw-r--r--app/models/concerns/stif_transport_mode_enumerations.rb6
-rw-r--r--app/models/concerns/stif_transport_submode_enumerations.rb6
2 files changed, 12 insertions, 0 deletions
diff --git a/app/models/concerns/stif_transport_mode_enumerations.rb b/app/models/concerns/stif_transport_mode_enumerations.rb
new file mode 100644
index 000000000..20154af97
--- /dev/null
+++ b/app/models/concerns/stif_transport_mode_enumerations.rb
@@ -0,0 +1,6 @@
+module StifTransportModeEnumerations
+ extend ActiveSupport::Concern
+ extend Enumerize
+
+ enumerize :transport_mode, in: %w(air bus coach ferry metro rail trolleyBus tram water cableway funicular other)
+end
diff --git a/app/models/concerns/stif_transport_submode_enumerations.rb b/app/models/concerns/stif_transport_submode_enumerations.rb
new file mode 100644
index 000000000..90eb60dba
--- /dev/null
+++ b/app/models/concerns/stif_transport_submode_enumerations.rb
@@ -0,0 +1,6 @@
+module StifTransportSubmodeEnumerations
+ extend ActiveSupport::Concern
+ extend Enumerize
+
+ enumerize :transport_submode, in: %w(unknown undefined internationalFlight domesticFlight intercontinentalFlight domesticScheduledFlight shuttleFlight intercontinentalCharterFlight internationalCharterFlight roundTripCharterFlight sightseeingFlight helicopterService domesticCharterFlight SchengenAreaFlight airshipService shortHaulInternationalFlight canalBarge localBus regionalBus expressBus nightBus postBus specialNeedsBus mobilityBus mobilityBusForRegisteredDisabled sightseeingBus shuttleBus highFrequencyBus dedicatedLaneBus schoolBus schoolAndPublicServiceBus railReplacementBus demandAndResponseBus airportLinkBus internationalCoach nationalCoach shuttleCoach regionalCoach specialCoach schoolCoach sightseeingCoach touristCoach commuterCoach metro tube urbanRailway local highSpeedRail suburbanRailway regionalRail interregionalRail longDistance intermational sleeperRailService nightRail carTransportRailService touristRailway railShuttle replacementRailService specialTrain crossCountryRail rackAndPinionRailway cityTram localTram regionalTram sightseeingTram shuttleTram trainTram internationalCarFerry nationalCarFerry regionalCarFerry localCarFerry internationalPassengerFerry nationalPassengerFerry regionalPassengerFerry localPassengerFerry postBoat trainFerry roadFerryLink airportBoatLink highSpeedVehicleService highSpeedPassengerService sightseeingService schoolBoat cableFerry riverBus scheduledFerry shuttleFerryService telecabin cableCar lift chairLift dragLift telecabinLink funicular streetCableCar allFunicularServices undefinedFunicular)
+end