Skip to content

Conditional redirect_path Based on Current User. #136

@Austin-dv-Evans

Description

@Austin-dv-Evans

Hello, I am wondering if it is possible to conditionally return one of two redirections based on the current user type. It appears that I cant pass a current_user third argument to the config.redirect_path. Is there any way I can access current_user from within this configuration?

I am hoping to do something like this.

config.redirect_path = lambda { |request, params, current_user| current_user.user_type_x ? '/path_one' : '/path_two' }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions