Skip to content
Janko Marohnić edited this page Apr 24, 2024 · 3 revisions

To use different layouts for different Rodauth views, you can compare the request path in the layout method:

# app/controllers/rodauth_controller.rb
class RodauthController < ApplicationController
  layout :rodauth_layout

  private

  def rodauth_layout
    case rodauth.current_route
    when :login, :create_account, :verify_account, :verify_account_resend,
         :reset_password, :reset_password_request
      "authentication"
    else
      "dashboard"
    end
  end
end
Clone this wiki locally