class ApplicationController < ActionController::Base
  protect_from_forgery with: :exception

  before_action :load_pages, :set_piller_page_urls

  def after_sign_in_path_for(resource)
  	return '/admin/dashboard' if current_user.present? 
  end


  private 

  	def load_pages
  		@pages = Page.where(:status => "Active").where(:type_of_page => "Normal").all
      @services_page = Page.where(:url => "services").first
  	end

  	def set_piller_page_urls
  		@pillars = Pillar.where(:status => "Active").where.not(:post_url => "internet-first")
  	end

end
