optimize queries
This commit is contained in:
parent
d7b3029383
commit
55aa37b8ae
8 changed files with 101 additions and 43 deletions
|
|
@ -1,9 +1,14 @@
|
|||
module Admin
|
||||
class BaseController < ApplicationController
|
||||
before_action :verify_user_admin
|
||||
before_action :load_all_conferences
|
||||
|
||||
private
|
||||
|
||||
def load_all_conferences
|
||||
@conferences = Conference.all
|
||||
end
|
||||
|
||||
def current_ability
|
||||
@current_ability ||= AdminAbility.new(current_user)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue