Sha256: 56ffc0cc1add4cf8d242c4dc3e88da49e3bd61a7fb82de46e5b815f59c881b7a

Contents?: true

Size: 394 Bytes

Versions: 3

Compression:

Stored size: 394 Bytes

Contents

class AccountObserver < ActiveRecord::Observer
  def after_create(account)
#    AccountMailer.deliver_signup_notification(account)
    
    address = Address.new
    address.save!
    
    user = User.new
    user.account = account
    user.address = address
    user.save!
  end

  def after_save(account)
#   AccountMailer.deliver_activation(account) if account.recently_activated?
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
emergent-core-0.1.0 rails_generators/emergent_config/templates/app/models/account_observer.rb
emergent-core-0.1.01 rails_generators/emergent_config/templates/app/models/account_observer.rb
emergent-core-0.1.02 rails_generators/emergent_config/templates/app/models/account_observer.rb