diff options
| author | cedricnjanga | 2017-11-22 12:30:38 +0100 | 
|---|---|---|
| committer | cedricnjanga | 2017-11-22 14:05:05 +0100 | 
| commit | f7b9b6ad5280179367c225e1d35d123bad67dcaf (patch) | |
| tree | 38e53dc036c42eaa2a7671200c1a0740d2d1dd86 /app/models/chouette/objectid | |
| parent | 9304f16e56c219fd63fa12b7d42a7cbf16b2914a (diff) | |
| download | chouette-core-f7b9b6ad5280179367c225e1d35d123bad67dcaf.tar.bz2 | |
Fix last spec and add short_id method to Netex Objectid
Diffstat (limited to 'app/models/chouette/objectid')
| -rw-r--r-- | app/models/chouette/objectid/netex.rb | 2 | ||||
| -rw-r--r-- | app/models/chouette/objectid/stif_codifligne.rb | 4 | ||||
| -rw-r--r-- | app/models/chouette/objectid/stif_reflex.rb | 4 | 
3 files changed, 9 insertions, 1 deletions
| diff --git a/app/models/chouette/objectid/netex.rb b/app/models/chouette/objectid/netex.rb index 7953c6b12..57415ac98 100644 --- a/app/models/chouette/objectid/netex.rb +++ b/app/models/chouette/objectid/netex.rb @@ -26,7 +26,7 @@ module Chouette        end        def short_id -        local_id +        local_id.try(:split, "-").try(:first)        end      end    end diff --git a/app/models/chouette/objectid/stif_codifligne.rb b/app/models/chouette/objectid/stif_codifligne.rb index a1e40f0a1..903ebc2dc 100644 --- a/app/models/chouette/objectid/stif_codifligne.rb +++ b/app/models/chouette/objectid/stif_codifligne.rb @@ -19,6 +19,10 @@ module Chouette        def to_s          "#{self.provider_id}:#{self.sync_id}:#{self.object_type}:#{self.local_id}"        end + +      def short_id +        local_id +      end      end    end  end
\ No newline at end of file diff --git a/app/models/chouette/objectid/stif_reflex.rb b/app/models/chouette/objectid/stif_reflex.rb index 69a3f52fa..cd0f62298 100644 --- a/app/models/chouette/objectid/stif_reflex.rb +++ b/app/models/chouette/objectid/stif_reflex.rb @@ -18,6 +18,10 @@ module Chouette        def to_s          "#{self.country_code}:#{self.zip_code}:#{self.object_type}:#{self.local_id}:#{self.provider_id}"        end + +       def short_id +        local_id +      end      end    end  end
\ No newline at end of file | 
