class PetitionLang < ActiveRecord::Base
  belongs_to :lang_site
  belongs_to :petition
  
  
	#validates :title, :presence => true, :uniqueness => true
	#validates :slug, :presence => true, :uniqueness => true
  belongs_to :top_image_file, :class_name => "ImageFile"
  belongs_to :side1_image_file, :class_name => "ImageFile"
  belongs_to :side2_image_file, :class_name => "ImageFile"
  belongs_to :background_image_file, :class_name => "ImageFile"
  
  
  
	before_validation do
		self.slug = self.title.to_slug if !self.slug?
		
	end
  
end
