Sha256: 74363d677a48acf311859b54b68e4e9ea9d02519fdbe24d7516cc0d3d56fc35d

Contents?: true

Size: 328 Bytes

Versions: 10

Compression:

Stored size: 328 Bytes

Contents

module Gaku
  class Attendance < ActiveRecord::Base
    belongs_to :attendancable, polymorphic: true
    belongs_to :student
    belongs_to :attendance_type

    validates :student, :attendance_type, presence: true
    validates_associated :attendancable, :student, :attendance_type

    def to_s
      reason
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
gaku-0.2.4 core/app/models/gaku/attendance.rb
gaku_core-0.2.4 app/models/gaku/attendance.rb
gaku-0.2.3 core/app/models/gaku/attendance.rb
gaku_core-0.2.3 app/models/gaku/attendance.rb
gaku-0.2.2 core/app/models/gaku/attendance.rb
gaku_core-0.2.2 app/models/gaku/attendance.rb
gaku-0.2.1 core/app/models/gaku/attendance.rb
gaku_core-0.2.1 app/models/gaku/attendance.rb
gaku-0.2.0 core/app/models/gaku/attendance.rb
gaku_core-0.2.0 app/models/gaku/attendance.rb