From 7f6cd886d3af5680bf349e61941f728e5a580ff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janko=20Marohni=C4=87?= Date: Mon, 25 Dec 2023 15:21:58 +0100 Subject: [PATCH] Add example of `rails` feature configuration --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 785fa4c..8cbbae1 100644 --- a/README.md +++ b/README.md @@ -634,6 +634,15 @@ The `rails` feature rodauth-rails loads provides the following configuration met | `rails_controller` | Controller class to use for rendering and CSRF protection. | | `rails_account_model` | Model class connected with the accounts table. | +```rb +class RodauthMain < Rodauth::Rails::Auth + configure do + rails_account_model { MyApp::Account } + rails_controller { MyApp::RodauthController } + end +end +``` + ### Manually inserting middleware You can choose to insert the Rodauth middleware somewhere earlier than