Class: City

Inherits:
ApplicationRecord show all
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

Belongs to collapse

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation

Methods included from Models::EventPublishable

#publish_event

Instance Method Details

#postal_codePostalCode

Returns:

See Also:



13
# File 'app/models/city.rb', line 13

belongs_to :postal_code, :primary_key => :code, :foreign_key => :code, optional: true