```ruby
class AdminController < ApplicationController
end
```

Check if admin before loading the admin page
user
```ruby
class AdminController < ApplicationController
  before_action :authorize_admin
  def authorize_admin
    redirect_to "/", alert: "Access denied" unless user_signed_in? && current_user.admin?
  end
end
```
assistant