Sha256: 367c1d672bc21d314bef64485abe75d26675e533a9456b15dbd4e36123b8e0f8

Contents?: true

Size: 279 Bytes

Versions: 26

Compression:

Stored size: 279 Bytes

Contents

module Gaku
  class Campus < ActiveRecord::Base

    include Contacts, Picture

    belongs_to :school
    has_one :address, as: :addressable

    validates :name, :school, presence: true

    scope :master, -> { where(master: true) }

    def to_s
      name
    end

  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
gaku_core-0.0.3 app/models/gaku/campus.rb
gaku-0.0.3 core/app/models/gaku/campus.rb
gaku-0.0.2 core/app/models/gaku/campus.rb
gaku_core-0.0.2 app/models/gaku/campus.rb
gaku-0.0.1 core/app/models/gaku/campus.rb
gaku_core-0.0.1 app/models/gaku/campus.rb