Permalink
Browse files

Minor patch

  • Loading branch information...
1 parent ba58c68 commit 9a8ba05f281e8765092768753cfe0b853055f5d6 Dan Blue committed Aug 5, 2011
Showing with 0 additions and 29 deletions.
  1. +0 −29 app/models/email_verification.rb
@@ -1,29 +0,0 @@
-# == Schema Information
-# Schema version: 20080916002106
-#
-# Table name: email_verifications
-#
-# id :integer(4) not null, primary key
-# person_id :integer(4)
-# code :string(255)
-# created_at :datetime
-# updated_at :datetime
-#
-
-class EmailVerification < ActiveRecord::Base
- belongs_to :person
- validates_presence_of :person_id, :code
- before_validation(:on => :create ) {make_code}
- after_create :send_verification_email
-
- private
-
- # Make a unique verification code.
- def make_code
- self.code = UUID.new
- end
-
- def send_verification_email
- PersonMailer.email_verification(self).deliver
- end
-end

0 comments on commit 9a8ba05

Please sign in to comment.