Sha256: 0b1f12011693bc375ca2ded676d24c1231a153ade68241d50dd91581efc62d74
Contents?: true
Size: 591 Bytes
Versions: 30
Compression:
Stored size: 591 Bytes
Contents
class School < ApplicationRecord validates_presence_of :name validates_uniqueness_of :name strip_attributes has_many :questionnaires belongs_to :bus_list, optional: true def full_name out = "" out << name if city.present? || state.present? out << " in " out << city if city.present? out << ", " if city.present? && state.present? out << state if state.present? end out end def bus_list return unless bus_list_id BusList.find(bus_list_id) end def fips_code Fips.where(city: city, state: state).first end end
Version data entries
30 entries across 30 versions & 1 rubygems