Class: City
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- City
- Defined in:
- app/models/city.rb
Overview
== Schema Information
Table name: cities
Database name: primary
id :integer not null, primary key
city_name :string(80)
city_type :string(1)
code :string(10) not null
Constant Summary
Constants included from Models::Schedulable
Models::Schedulable::SIMPLE_FORM_OPTIONS
Belongs to collapse
-
#postal_code ⇒ PostalCode?
The postal code this city name belongs to.
Methods inherited from ApplicationRecord
ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation
Methods included from Models::Schedulable
Methods included from Models::AfterCommittable
Methods included from Models::EventPublishable
Instance Method Details
#postal_code ⇒ PostalCode?
Returns the postal code this city name belongs to.
14 |
# File 'app/models/city.rb', line 14 belongs_to :postal_code, primary_key: :code, foreign_key: :code, optional: true |