Class: FlyAdmin::ApplicationController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/fly_admin/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#authenticate_admin!Object



4
5
6
7
8
# File 'app/controllers/fly_admin/application_controller.rb', line 4

def authenticate_admin!
  unless current_user && current_user.admin?
    redirect_to main_app.root_url
  end
end