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
31 32 33 |
# File 'app/models/gaku/school.rb', line 31 def self.primary where(primary: true).first end |
Instance Method Details
#code_and_name ⇒ Object
35 36 37 |
# File 'app/models/gaku/school.rb', line 35 def code_and_name "#{code}: #{name}" end |
#primary? ⇒ Boolean
27 28 29 |
# File 'app/models/gaku/school.rb', line 27 def primary? primary end |
#to_s ⇒ Object
23 24 25 |
# File 'app/models/gaku/school.rb', line 23 def to_s name end |