Sha256: 8e2edb2b26a9edc63004d0ca65fd3a0a3daf990e110f1808844bad74ee14490b

Contents?: true

Size: 446 Bytes

Versions: 5

Compression:

Stored size: 446 Bytes

Contents

# frozen_string_literal: true

class DashboardController < ApplicationController
  before_action :require_logged_user, except: %w[log_in not_logged]
  before_action :redirect_logged_user, only: "not_logged"

  def index
    head :ok
  end

  def log_in
    user_session.record = User.last!
    head :ok
  end

  def not_logged
    head :ok
  end

  private def authorized_user?
    current_user.try(:email).to_s.match(/@example.com\z/)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
simple_auth-3.1.4 test/support/dummy/app/controllers/dashboard_controller.rb
simple_auth-3.1.3 test/support/dummy/app/controllers/dashboard_controller.rb
simple_auth-3.1.2 test/support/dummy/app/controllers/dashboard_controller.rb
simple_auth-3.1.1 test/support/dummy/app/controllers/dashboard_controller.rb
simple_auth-3.1.0 test/support/dummy/app/controllers/dashboard_controller.rb