Sha256: 447a6b08f23aa770e445b5e655fdbb6fe40f873651a01e16f331706a3c9830ab

Contents?: true

Size: 369 Bytes

Versions: 26

Compression:

Stored size: 369 Bytes

Contents

# encoding: utf-8
class MagicAddresses::Addressible < ActiveRecord::Base
  
  belongs_to :owner,      polymorphic: true
  belongs_to :address,    class_name: "MagicAddresses::Address",    foreign_key: :address_id
  
  after_create :log_some_stuff
  
private
  
  def log_some_stuff
    self.address ? self.address.trigger_build_address_associations : true
  end
  
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
magic_addresses-0.0.38 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.38.beta2 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.38.beta1 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.37 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.36 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.35 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.34 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.33 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.32 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.31 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.30 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.29 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.28 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.27 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.26 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.25 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.24 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.23 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.22 lib/app/models/magic_addresses/addressible.rb
magic_addresses-0.0.21 lib/app/models/magic_addresses/addressible.rb