lib/generators/rodauth/templates/app/controllers/rodauth_controller.rb.tt in rodauth-rails-1.14.0 vs lib/generators/rodauth/templates/app/controllers/rodauth_controller.rb.tt in rodauth-rails-1.15.0

- old
+ new

@@ -1,4 +1,20 @@ class RodauthController < ApplicationController - # used by Rodauth for rendering views, CSRF protection, and running any - # registered action callbacks and rescue_from handlers + # Used by Rodauth for rendering views, CSRF protection, running any + # registered action callbacks and rescue handlers, instrumentation etc. + + # Controller callbacks and rescue handlers will run around Rodauth endpoints. + # before_action :verify_captcha, only: :login, if: -> { request.post? } + # rescue_from("SomeError") { |exception| ... } + + # Layout can be changed for all Rodauth pages or only certain pages. + # layout "authentication" + # layout -> do + # case rodauth.current_route + # when :login, :create_account, :verify_account, :verify_account_resend, + # :reset_password, :reset_password_request + # "authentication" + # else + # "application" + # end + # end end