Module: Auxilium::Concerns::AdminAuthenticated

Extended by:
ActiveSupport::Concern
Defined in:
lib/auxilium/concerns/admin_authenticated.rb

Instance Method Summary collapse

Instance Method Details

#admin_authenticatedObject



8
9
10
11
12
# File 'lib/auxilium/concerns/admin_authenticated.rb', line 8

def admin_authenticated
  authenticate_user!

  redirect_to root_path unless current_user.has_role?(:admin)
end