# encoding: utf-8
class Recenzie < ActiveRecord::Base
  set_primary_key :ID_Recenzia
  set_table_name :recenzie
  
  belongs_to :podujatia, :foreign_key => 'ID_Podujatie', :class_name => Podujatium
  
  validates :Datum, :Popis, :Alias, :ID_Podujatie, :presence => true
  
  validates_length_of :Alias, :maximum => 20, :message => 'Zvolte si, prosím, kratší alias!'
end
