diff options
| author | Guillaume | 2017-11-16 18:02:29 +0100 | 
|---|---|---|
| committer | Guillaume | 2017-11-16 18:02:29 +0100 | 
| commit | 8cbad698e0fe517602bca4b82ae60795eca12ab0 (patch) | |
| tree | cb12e0219612aa817244f5e50e986cf02e6f3aa2 | |
| parent | 56b0750240bba55859f78d0937090278527cb02c (diff) | |
| download | chouette-core-8cbad698e0fe517602bca4b82ae60795eca12ab0.tar.bz2 | |
Refs #4941 Add default value ('netex') for objectid_format enumerize
| -rw-r--r-- | app/models/line_referential.rb | 2 | ||||
| -rw-r--r-- | app/models/referential.rb | 2 | ||||
| -rw-r--r-- | app/models/stop_area_referential.rb | 2 | ||||
| -rw-r--r-- | app/models/workbench.rb | 2 | 
4 files changed, 4 insertions, 4 deletions
| diff --git a/app/models/line_referential.rb b/app/models/line_referential.rb index f4cf9cb30..d8cf74bda 100644 --- a/app/models/line_referential.rb +++ b/app/models/line_referential.rb @@ -11,7 +11,7 @@ class LineReferential < ActiveRecord::Base    has_many :networks, class_name: 'Chouette::Network'    has_many :line_referential_syncs, -> { order created_at: :desc }    has_many :workbenches -  enumerize :objectid_format, in: %w(netex stif_netex stif_reflex stif_codifligne) +  enumerize :objectid_format, in: %w(netex stif_netex stif_reflex stif_codifligne), default: 'netex'    def add_member(organisation, options = {})      attributes = options.merge organisation: organisation diff --git a/app/models/referential.rb b/app/models/referential.rb index ca6a21e35..8003d342f 100644 --- a/app/models/referential.rb +++ b/app/models/referential.rb @@ -56,7 +56,7 @@ class Referential < ActiveRecord::Base    belongs_to :referential_suite -  enumerize :objectid_format, in: %w(netex stif_netex stif_reflex stif_codifligne) +  enumerize :objectid_format, in: %w(netex stif_netex stif_reflex stif_codifligne), default: 'netex'    scope :ready, -> { where(ready: true) }    scope :in_periode, ->(periode) { where(id: referential_ids_in_periode(periode)) } diff --git a/app/models/stop_area_referential.rb b/app/models/stop_area_referential.rb index 20644c3bb..159ee07b3 100644 --- a/app/models/stop_area_referential.rb +++ b/app/models/stop_area_referential.rb @@ -7,7 +7,7 @@ class StopAreaReferential < ActiveRecord::Base    has_many :stop_areas, class_name: 'Chouette::StopArea'    has_many :stop_area_referential_syncs, -> {order created_at: :desc}    has_many :workbenches -  enumerize :objectid_format, in: %w(netex stif_netex stif_reflex stif_codifligne) +  enumerize :objectid_format, in: %w(netex stif_netex stif_reflex stif_codifligne), default: 'netex'    validates_presence_of :objectid_format    def add_member(organisation, options = {}) diff --git a/app/models/workbench.rb b/app/models/workbench.rb index 1f0593cfe..95e4d1b68 100644 --- a/app/models/workbench.rb +++ b/app/models/workbench.rb @@ -5,7 +5,7 @@ class Workbench < ActiveRecord::Base    belongs_to :line_referential    belongs_to :stop_area_referential    belongs_to :output, class_name: 'ReferentialSuite' -  enumerize :objectid_format, in: %w(netex stif_netex stif_reflex stif_codifligne) +  enumerize :objectid_format, in: %w(netex stif_netex stif_reflex stif_codifligne), default: 'netex'    has_many :lines, -> (workbench) { Stif::MyWorkbenchScopes.new(workbench).line_scope(self) }, through: :line_referential    has_many :networks, through: :line_referential | 
