Sha256: 27be01af19d48ff418413a17efe5ac88fa87aefea9aa1d9cfd79f1510e3760fc
Contents?: true
Size: 387 Bytes
Versions: 26
Compression:
Stored size: 387 Bytes
Contents
module RedirectIfAuthenticated extend ActiveSupport::Concern included do before_action :redirect_if_authenticated! end class_methods do def skip_redirect_if_authenticated(**options) skip_before_action :redirect_if_authenticated!, **options end end private def redirect_if_authenticated! redirect_to dashboard_path if Current.auth.check? end end
Version data entries
26 entries across 13 versions & 1 rubygems