Class: Gaku::School

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Picture
Defined in:
app/models/gaku/school.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.primaryObject



30
31
32
# File 'app/models/gaku/school.rb', line 30

def self.primary
  where(primary: true).first
end

Instance Method Details

#code_and_nameObject



34
35
36
# File 'app/models/gaku/school.rb', line 34

def code_and_name
  "#{code}: #{name}"
end

#primary?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'app/models/gaku/school.rb', line 26

def primary?
  primary
end

#to_sObject



22
23
24
# File 'app/models/gaku/school.rb', line 22

def to_s
  name
end