diff options
| author | cedricnjanga | 2017-11-16 16:44:37 +0100 | 
|---|---|---|
| committer | Guillaume | 2017-11-16 16:44:37 +0100 | 
| commit | 3f39b62beb9ff7af741696a6c3c7e87737c3a257 (patch) | |
| tree | cbb89c8eb78fa9349bf499ffc01483d25554c3d0 /app/models/referential.rb | |
| parent | e5fcb0cc0728cbb673c1f5cf346e865fbbbc593a (diff) | |
| download | chouette-core-3f39b62beb9ff7af741696a6c3c7e87737c3a257.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/referential.rb')
| -rw-r--r-- | app/models/referential.rb | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/app/models/referential.rb b/app/models/referential.rb index 87ac61f56..04b5e3102 100644 --- a/app/models/referential.rb +++ b/app/models/referential.rb @@ -1,10 +1,12 @@  class Referential < ActiveRecord::Base    include DataFormatEnumerations +  include ObjectidFormaterSupport    extend Enumerize    validates_presence_of :name    validates_presence_of :slug    validates_presence_of :prefix +  validates_presence_of :objectid_format    # Fixme #3657    # validates_presence_of :time_zone    # validates_presence_of :upper_corner @@ -54,8 +56,7 @@ class Referential < ActiveRecord::Base    belongs_to :referential_suite -  enumerize :objectid_format, in: %w(netex stif_netex) -  validates_presence_of :objectid_format +  enumerize :objectid_format, in: %w(netex stif_netex stif_reflex stif_codifligne)    scope :ready, -> { where(ready: true) }    scope :in_periode, ->(periode) { where(id: referential_ids_in_periode(periode)) } | 
