-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Multi tenant Examples #260
Conversation
This way we get access to String#delete_suffix and String#delete_prefix methods.
Format suffixes won't be routed by Rodauth, so we can communicate that when declaring the routes.
4989c3e
to
797075f
Compare
Thanks for the PR. rodauth-rails doesn't have any special multi-tenancy support, so it wouldn't really make sense to add these examples to the test suite. What would IMO be far more useful is a wiki page with instructions on how to configure rodauth-rails for multi-tenancy 😉 The wiki is publicly editable, so feel free to add a new page. |
segs = login_path.split('/') | ||
segs.insert(-2, request.env[:path_key]) | ||
segs.join('/') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed, BTW? Won't the overridden #prefix
method automatically add the path_key
?
It seems you have two sources of path_key
– the attribute accessor and request.env
. Maybe that's why it isn't working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That shouldn't be there... It was one of my transitional hacks as I figured it out... Not sure why it is still there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a wiki page once I have it all setup and working!
I got it working!
At least the parts that are tested. I'll add more.
I based this on top of branch https://github.com/janko/rodauth-rails/tree/url-helpers (PR #245) but also rebased on top of latest main as of 71eaf3d.
I did this because it looked like the
url-helpers
branch was building in the direction of what I needed.