Sha256: b5a01dc1076974d6c5c5b119a054e4b605f8237c46d04257db25ed1a3426292a

Contents?: true

Size: 1.63 KB

Versions: 1

Compression:

Stored size: 1.63 KB

Contents

# encoding: utf-8
class Location::City < ActiveRecord::Base
  
  # =====> R E W R I T E S <================================================================= #
  include GlobalizedName
  
  # =====> C O N S T A N T S <=============================================================== #
  
  # =====> A S S O Z I A T I O N S <========================================================= #
  belongs_to :state,      class_name: "Location::State",    foreign_key: :state_id
  belongs_to :country,    class_name: "Location::Country",  foreign_key: :country_id
  
  has_many :addresses,    class_name: "Location::Address",  foreign_key: :city_id
  has_many :districts,    class_name: "Location::District",  foreign_key: :city_id
  has_many :subdistricts, through: :districts,              source: :subdistricts
  
  
  # =====> A T T R I B U T E S <============================================================= #
  
  
  # =====> V A L I D A T I O N <============================================================= #
  
  # =====> C A L L B A C K S <=============================================================== #
  
  # =====> S C O P E S <===================================================================== #
  # => default_scope { includes(:translations).with_translations(I18n.locale).order( 'location_city_translations.name ASC' ) }
  
  
  # =====> C L A S S - M E T H O D S <======================================================= #
  
  
  # =====> I N S T A N C E - M E T H O D S <================================================= #
  
  
  # =====>  P  R  I  V  A  T  E  !  <======================================================== # # # # # # # #
# private
  
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
magic_addresses-0.0.1 app/models/location/city.rb