Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set failure_app per scope #193

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 23, 2020

  1. Set failure_app per scope

    It's possible to configure failure apps per scope:
    
    Current config:
    
    ```
    use Warden::Manager do |manager|
      manager.failure_app = MyCustomFailureApp
    end
    ```
    
    Single scope config:
    
    ```
    use Warden::Manager do |manager|
      manager.failure_app = { app: MyCustomFailureApp, scope: :user }
    end
    ```
    
    Multiple scopes config:
    
    ```
    use Warden::Manager do |manager|
      manager.failure_app = [
        { app: MyCustomFailureApp, scope: :user },
        { app: AnotherCustomFailureApp, scope: :psychologist }
      ]
    end
    ```
    
    A RuntimeError is raised if no matching Failure App is found.
    willianveiga committed Oct 23, 2020
    Configuration menu
    Copy the full SHA
    7d9d454 View commit details
    Browse the repository at this point in the history