class PagesController < ApplicationController before_action -> { @skip_auth = true } skip_before_action :authenticate_user! def home if current_user redirect_to dashboard_path end end end