Sha256: 0a4b9f9814bd6761c7f85da3dbd8fcfcd41b6b94eaeeb473704a7417825f569c
Contents?: true
Size: 401 Bytes
Versions: 7
Compression:
Stored size: 401 Bytes
Contents
# frozen_string_literal: true module Admin class AdminController < ApplicationController include Devise::Controllers::Helpers include Pagy::Backend layout "admin/layouts/application" before_action :authenticate_admin! protected def authenticate_admin! authenticate_user! redirect_to :somewhere, status: :forbidden unless current_user.admin? end end end
Version data entries
7 entries across 7 versions & 1 rubygems