# encoding: UTF-8
class ApplicationController < ActionController::Base
  before_filter :autorizacia
  protect_from_forgery #ochrana pred CSRF
  
  private
  
  def autorizacia
    unless @active_user = Zamestnanci.find_by_ID_Zam(session[:ID_Zam])
      redirect_to sedenie_path, :notice => "Prihláste sa prosím!"
    end
  end
  
  
  
end
