Sha256: 924663de2f72e7305a1339b98fd5940e14d287a746246a9545a964bac87486e6
Contents?: true
Size: 530 Bytes
Versions: 18
Compression:
Stored size: 530 Bytes
Contents
class School < ApplicationRecord validates_presence_of :name validates_uniqueness_of :name strip_attributes has_many :questionnaires def full_name out = "" out << name if full_location.present? out << " in " out << full_location end out end def full_location out = "" out << city if city.present? out << ", " if city.present? && state.present? out << state if state.present? out end def fips_code Fips.where(city: city, state: state).first end end
Version data entries
18 entries across 18 versions & 1 rubygems