Sha256: 50f2e5ca8853f10933b5d5dcc91bbca879325166aedfa200c0899279b552b3ac

Contents?: true

Size: 750 Bytes

Versions: 53

Compression:

Stored size: 750 Bytes

Contents

# encoding: utf-8
class MagicAddresses::State < ActiveRecord::Base

  # =====> A S S O Z I A T I O N S <========================================================= #
  has_many :addresses,    class_name: "MagicAddresses::Address",  foreign_key: :state_id
  
  belongs_to :country,    class_name: "MagicAddresses::Country",  foreign_key: :country_id
  
  has_many :cities,       class_name: "MagicAddresses::City",     foreign_key: :state_id
  has_many :districts,    through: :cities,                       source: :districts
  has_many :subdistricts, through: :districts,                    source: :subdistricts
  
  
  # =====> A T T R I B U T E S <============================================================= #
  mgca_translate :name
  
  
  
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
magic_addresses-0.0.44 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.43 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.42 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.41 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.40 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.39 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.39.rc8 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.39.rc7 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.39.rc6 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.39.rc5 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.39.rc4 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.39.rc3 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.39.rc2 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.39.rc1 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.38 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.38.beta2 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.38.beta1 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.37 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.36 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.35 lib/app/models/magic_addresses/state.rb