Sha256: b98def060c2672104b902167922019e239d341c5e7897e2838eb0a1944a7d59c

Contents?: true

Size: 330 Bytes

Versions: 10

Compression:

Stored size: 330 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.1.1 core/app/models/gaku/attendance.rb
gaku_core-0.1.1 app/models/gaku/attendance.rb
gaku-0.1.0 core/app/models/gaku/attendance.rb
gaku_core-0.1.0 app/models/gaku/attendance.rb
gaku_core-0.0.3 app/models/gaku/attendance.rb
gaku-0.0.3 core/app/models/gaku/attendance.rb
gaku-0.0.2 core/app/models/gaku/attendance.rb
gaku_core-0.0.2 app/models/gaku/attendance.rb
gaku-0.0.1 core/app/models/gaku/attendance.rb
gaku_core-0.0.1 app/models/gaku/attendance.rb