aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/line_referential.rb
diff options
context:
space:
mode:
authorcedricnjanga2017-11-10 17:23:45 +0100
committercedricnjanga2017-11-10 17:23:45 +0100
commit3b3d3252aa514fbd5b2c12a6cc0a2825d9d8b12e (patch)
tree5d22bfc466fd50b76dd805f891b62f59132d22fa /app/models/line_referential.rb
parent2f8ff43fe89a8c78575fdb7a9737b5484117087c (diff)
downloadchouette-core-3b3d3252aa514fbd5b2c12a6cc0a2825d9d8b12e.tar.bz2
Add validation and specs to models on objectid_format presence
Diffstat (limited to 'app/models/line_referential.rb')
-rw-r--r--app/models/line_referential.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/line_referential.rb b/app/models/line_referential.rb
index cbe07e9b1..d81644080 100644
--- a/app/models/line_referential.rb
+++ b/app/models/line_referential.rb
@@ -10,7 +10,8 @@ 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(default_netex stif_netex)
+ enumerize :objectid_format, in: %w(netex stif_netex)
+ validates_presence_of :objectid_format
def add_member(organisation, options = {})
attributes = options.merge organisation: organisation