aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/line_referential.rb
diff options
context:
space:
mode:
authorGuillaume2017-11-09 15:20:54 +0100
committerGuillaume2017-11-09 15:21:01 +0100
commitaafda8b5d8e6dbd80ed56fd469d5ada5dceb3a67 (patch)
tree6e63632be099a8a86fcca69bcc2814efbff57c0a /app/models/line_referential.rb
parent4dbe0a7b5acf4e244016d58d59a96aca36035263 (diff)
downloadchouette-core-aafda8b5d8e6dbd80ed56fd469d5ada5dceb3a67.tar.bz2
add object_id_format to migrations, create module for call Referential, Line Referential, StopAreaReferential in models, add Enumerize in models Refs #4941
Diffstat (limited to 'app/models/line_referential.rb')
-rw-r--r--app/models/line_referential.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/line_referential.rb b/app/models/line_referential.rb
index 8bc6adec3..b841ea6a9 100644
--- a/app/models/line_referential.rb
+++ b/app/models/line_referential.rb
@@ -1,5 +1,6 @@
class LineReferential < ActiveRecord::Base
extend StifTransportModeEnumerations
+ extend Enumerize
has_many :line_referential_memberships
has_many :organisations, through: :line_referential_memberships
@@ -9,6 +10,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 :object_id_format, in: %w(netx netx_stif)
def add_member(organisation, options = {})
attributes = options.merge organisation: organisation