1require_dependency 'archived'
 
2
 
3module Archived
 
4  class Petition < ActiveRecord::Base
 
5    class Email < ActiveRecord::Base
 
6      belongs_to :petition, touch: true
 
7
 
8      validates :petition, presence: true
 
 9      validates :subject, presence: true, length: { maximum: 100 }
 
10      validates :body, presence: true, length: { maximum: 5000 }
 
11    end
 
12  end
 
13end