blob: 893826a96748ebdb15a5a94d0ef7e83958e18616 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# -*- encoding : utf-8 -*-
# == 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
|