Class: School
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- School
- Defined in:
- app/models/school.rb
Instance Method Summary collapse
Instance Method Details
#bus_list ⇒ Object
29 30 31 32 |
# File 'app/models/school.rb', line 29 def bus_list return unless bus_list_id BusList.find(bus_list_id) end |
#fips_code ⇒ Object
34 35 36 |
# File 'app/models/school.rb', line 34 def fips_code Fips.where(city: city, state: state).first end |
#full_location ⇒ Object
21 22 23 24 25 26 27 |
# File 'app/models/school.rb', line 21 def full_location out = "" out << city if city.present? out << ", " if city.present? && state.present? out << state if state.present? out end |
#full_name ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'app/models/school.rb', line 11 def full_name out = "" out << name if full_location.present? out << " in " out << full_location end out end |