Class: Gaku::School
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Gaku::School
- Includes:
- Picture
- Defined in:
- app/models/gaku/school.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.primary ⇒ Object
30 31 32 |
# File 'app/models/gaku/school.rb', line 30 def self.primary where(primary: true).first end |
Instance Method Details
#code_and_name ⇒ Object
34 35 36 |
# File 'app/models/gaku/school.rb', line 34 def code_and_name "#{code}: #{name}" end |
#primary? ⇒ Boolean
26 27 28 |
# File 'app/models/gaku/school.rb', line 26 def primary? primary end |
#to_s ⇒ Object
22 23 24 |
# File 'app/models/gaku/school.rb', line 22 def to_s name end |