class WwwController < ApplicationController

  rescue_from CanCan::AccessDenied do |exception|
    render template: 'www/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

  def applications_category
    @applications_category = Page.find 7 #Herramientas o Aplicaciones
  end
  helper_method :applications_category

end
