Sha256: f2202c77b0b7e0618d211fd41e79103039eba255d7164b41d7552d9611b889c6
Contents?: true
Size: 480 Bytes
Versions: 3
Compression:
Stored size: 480 Bytes
Contents
module Elabs module Admin class AdminApplicationController < ElabsApplicationController DEFAULT_ORDER_FIELD = 'id'.freeze MAX_ITEMS_PER_PAGE = Elabs.max_admin_items_per_page before_action :authenticate_admin! layout 'elabs/layouts/admin_application' private def authenticate_admin! authenticate_user! redirect_to user_url(current_user.id), status: :unauthorized unless current_user.admin? end end end end
Version data entries
3 entries across 3 versions & 1 rubygems