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.34 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.33 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.32 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.31 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.30 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.29 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.28 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.27 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.26 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.25 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.24 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.23 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.22 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.21 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.20 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.19 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.18 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.17 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.16 lib/app/models/magic_addresses/state.rb
magic_addresses-0.0.15 lib/app/models/magic_addresses/state.rb