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.3.0 app/models/gaku/campus.rb
gaku_core-0.3.0.pre.4 app/models/gaku/campus.rb
gaku_core-0.3.0.pre.3 app/models/gaku/campus.rb
gaku_core-0.3.0.pre.2 app/models/gaku/campus.rb
gaku_core-0.3.0.pre.1 app/models/gaku/campus.rb
gaku_core-0.3.0.pre.0 app/models/gaku/campus.rb
gaku-0.2.4 core/app/models/gaku/campus.rb
gaku_core-0.2.4 app/models/gaku/campus.rb
gaku-0.2.3 core/app/models/gaku/campus.rb
gaku_core-0.2.3 app/models/gaku/campus.rb
gaku-0.2.2 core/app/models/gaku/campus.rb
gaku_core-0.2.2 app/models/gaku/campus.rb
gaku-0.2.1 core/app/models/gaku/campus.rb
gaku_core-0.2.1 app/models/gaku/campus.rb
gaku-0.2.0 core/app/models/gaku/campus.rb
gaku_core-0.2.0 app/models/gaku/campus.rb
gaku-0.1.1 core/app/models/gaku/campus.rb
gaku_core-0.1.1 app/models/gaku/campus.rb
gaku-0.1.0 core/app/models/gaku/campus.rb
gaku_core-0.1.0 app/models/gaku/campus.rb