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



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

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

Instance Method Details

#code_and_nameObject



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

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

#primary?Boolean

Returns:

  • (Boolean)


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

def primary?
  primary
end

#to_sObject



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

def to_s
  name
end