diff options
| author | cedricnjanga | 2017-11-16 16:10:48 +0100 |
|---|---|---|
| committer | cedricnjanga | 2017-11-22 12:41:57 +0100 |
| commit | 6a4e6e9363913415b9dc35725b7ac85ec9166368 (patch) | |
| tree | 99d0e8006fb93f0cd659ccaceaf467e24c1b5ea8 | |
| parent | 31db1bba72800bddfa5dc9db4419ba95178dc4ff (diff) | |
| download | chouette-core-6a4e6e9363913415b9dc35725b7ac85ec9166368.tar.bz2 | |
Create objectid format and integrate it in models. Work in progress. Refs #4941
| -rw-r--r-- | app/models/line_referential.rb | 8 | ||||
| -rw-r--r-- | app/models/referential.rb | 8 | ||||
| -rw-r--r-- | app/models/stop_area_referential.rb | 8 |
3 files changed, 24 insertions, 0 deletions
diff --git a/app/models/line_referential.rb b/app/models/line_referential.rb index d8cf74bda..0d7125a57 100644 --- a/app/models/line_referential.rb +++ b/app/models/line_referential.rb @@ -1,5 +1,9 @@ class LineReferential < ActiveRecord::Base +<<<<<<< HEAD include ObjectidFormatterSupport +======= + include ObjectidFormaterSupport +>>>>>>> Create objectid format and integrate it in models. Work in progress. Refs #4941 extend StifTransportModeEnumerations extend Enumerize @@ -11,7 +15,11 @@ class LineReferential < ActiveRecord::Base has_many :networks, class_name: 'Chouette::Network' has_many :line_referential_syncs, -> { order created_at: :desc } has_many :workbenches +<<<<<<< HEAD enumerize :objectid_format, in: %w(netex stif_netex stif_reflex stif_codifligne), default: 'netex' +======= + enumerize :objectid_format, in: %w(netex stif_netex stif_reflex stif_codifligne) +>>>>>>> Create objectid format and integrate it in models. Work in progress. Refs #4941 def add_member(organisation, options = {}) attributes = options.merge organisation: organisation diff --git a/app/models/referential.rb b/app/models/referential.rb index fa6bcbcf1..372f303f1 100644 --- a/app/models/referential.rb +++ b/app/models/referential.rb @@ -1,6 +1,10 @@ class Referential < ActiveRecord::Base include DataFormatEnumerations +<<<<<<< HEAD include ObjectidFormatterSupport +======= + include ObjectidFormaterSupport +>>>>>>> Create objectid format and integrate it in models. Work in progress. Refs #4941 extend Enumerize validates_presence_of :name @@ -56,7 +60,11 @@ class Referential < ActiveRecord::Base belongs_to :referential_suite +<<<<<<< HEAD enumerize :objectid_format, in: %w(netex stif_netex stif_reflex stif_codifligne), default: 'netex' +======= + enumerize :objectid_format, in: %w(netex stif_netex stif_reflex stif_codifligne) +>>>>>>> Create objectid format and integrate it in models. Work in progress. Refs #4941 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 159ee07b3..5709a43a9 100644 --- a/app/models/stop_area_referential.rb +++ b/app/models/stop_area_referential.rb @@ -1,13 +1,21 @@ class StopAreaReferential < ActiveRecord::Base extend Enumerize +<<<<<<< HEAD include ObjectidFormatterSupport +======= + include ObjectidFormaterSupport +>>>>>>> Create objectid format and integrate it in models. Work in progress. Refs #4941 has_many :stop_area_referential_memberships has_many :organisations, through: :stop_area_referential_memberships has_many :stop_areas, class_name: 'Chouette::StopArea' has_many :stop_area_referential_syncs, -> {order created_at: :desc} has_many :workbenches +<<<<<<< HEAD enumerize :objectid_format, in: %w(netex stif_netex stif_reflex stif_codifligne), default: 'netex' +======= + enumerize :objectid_format, in: %w(netex stif_netex stif_reflex stif_codifligne) +>>>>>>> Create objectid format and integrate it in models. Work in progress. Refs #4941 validates_presence_of :objectid_format def add_member(organisation, options = {}) |
