class CategoryLang < ApplicationRecord
  belongs_to :lang_site
  belongs_to :category
  
  validates :name, :presence => true, :uniqueness => {:scope => :lang_site_id}
	validates :slug, :presence => true, :uniqueness => {:scope => :lang_site_id}
	
  before_validation do
  	self.slug = self.name.to_slug
    #self.validate_permalink
		
	end
  
  
  
end
