class AgendaController < ApplicationController
  
  layout 'agenda'

  rescue_from CanCan::AccessDenied do |exception|
    render template: 'agenda/access_denied'
  end
  
  module Filters
    def get_pages
      @pages = Page.where(portal: 'www', active: true, page_id: nil).order(:priority)
    end
    
    def init_namespace
      get_pages
    end
  end
  
  include Filters
  
  before_filter :init_namespace
end
