Skip to content

Commit

Permalink
Add example of rails feature configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
janko committed Dec 25, 2023
1 parent e22d02a commit 7f6cd88
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7f6cd88

Please sign in to comment.