Sha256: a29a47592e8fb97bc4f349feebdf7a904df305b953f5f84c9b23e3e6e43e4c09

Contents?: true

Size: 306 Bytes

Versions: 2

Compression:

Stored size: 306 Bytes

Contents

class Admin::ApplicationController < ActionController::Base
  include Pagy::Backend

  before_action :authenticate

  def authenticate
    if admin_user = Admin::User.find_by_id(session[:admin_user_id])
      Admin::Current.user = admin_user
    else
      redirect_to admin_sign_in_path
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
administration-zero-0.0.11 lib/generators/admin/install/templates/controllers/admin/application_controller.rb
administration-zero-0.0.10 lib/generators/admin/install/templates/controllers/admin/application_controller.rb