blob: 2c84beaa0ed60a810f9ef70aafc4942f90e36f54 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# == Schema Information
#
# Table name: spam_addresses
#
# id :integer not null, primary key
# email :string(255) not null
# created_at :datetime not null
# updated_at :datetime not null
#
class SpamAddress < ActiveRecord::Base
attr_accessible :email
validates_presence_of :email, :message => 'Please enter the email address to mark as spam'
validates_uniqueness_of :email, :message => 'This address is already marked as spam'
def self.spam?(email_address)
exists?(:email => email_address)
end
end
|