optimize queries

This commit is contained in:
Zach Kemp 2018-04-11 15:03:05 -07:00 • committed by zvkemp
parent d7b3029383
commit 55aa37b8ae
8 changed files with 101 additions and 43 deletions

View file

@ -3,7 +3,6 @@ class ApplicationController < ActionController::Base
include ApplicationHelper
add_flash_types :error
protect_from_forgery with: :exception, prepend: true
before_action :get_conferences
before_action :store_location
# Ensure every controller authorizes resource or skips authorization (skip_authorization_check)
check_authorization unless: :devise_controller?
@ -35,10 +34,6 @@ class ApplicationController < ActionController::Base
end
end
def get_conferences
@conferences = Conference.all
end
def current_ability
@current_ability ||= Ability.new(current_user)
end