aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/chouette/footnote.rb
blob: 051027ceaeb56b71d0b8c2c5a6849718b8ffff9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module Chouette
  class Footnote < Chouette::ActiveRecord
    include ChecksumSupport

    belongs_to :line, inverse_of: :footnotes
    has_and_belongs_to_many :vehicle_journeys, :class_name => 'Chouette::VehicleJourney'

    validates_presence_of :line

    def checksum_attributes
      attrs = ['code', 'label']
      self.slice(*attrs).values
    end
  end
end