Sha256: a3ed1107857ed64aec010e38619903ba9097d357c74d88dd6a80111c1388f0dd

Contents?: true

Size: 304 Bytes

Versions: 9

Compression:

Stored size: 304 Bytes

Contents

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

  before_action :authenticate

  def authenticate
    if admin_user = AdminUser.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

9 entries across 9 versions & 1 rubygems

Version Path
administration-zero-0.0.9 lib/generators/admin/install/templates/controllers/admin/application_controller.rb
administration-zero-0.0.8 lib/generators/admin/install/templates/controllers/admin/application_controller.rb
administration-zero-0.0.7 lib/generators/admin/install/templates/controllers/admin/application_controller.rb
administration-zero-0.0.6 lib/generators/admin/install/templates/controllers/admin/application_controller.rb
administration-zero-0.0.5 lib/generators/admin/install/templates/controllers/admin/application_controller.rb
administration-zero-0.0.4 lib/generators/admin/install/templates/controllers/admin/application_controller.rb
administration-zero-0.0.3 lib/generators/admin/install/templates/controllers/admin/application_controller.rb
administration-zero-0.0.2 lib/generators/admin/install/templates/controllers/admin/application_controller.rb
administration-zero-0.0.1 lib/generators/admin/install/templates/controllers/admin/application_controller.rb