class MailType < ActiveRecord::Base
  has_many :mail_contents
  belongs_to :mail_type_reference, :class_name => "MailType"



  def self.generate_mail_content(slug)
    mc = MailType.new(:slug => slug)
    LangSite.all.each do |ls|
      
      mc.mail_contents.new(:lang_site_id => ls.id, :content_type => "text")
    end
    mc.save
  end
  
  
end
