diff options
Diffstat (limited to 'app')
| -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 |
