-
Notifications
You must be signed in to change notification settings - Fork 143
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
Routing spec for Engine #173
Comments
which version of Rails? |
Rails version |
Could you please give a try with 5.1.2? |
Ok, I just did, i'm still getting the same behavior. By doing this, I'm getting
So if I go directly to root path, then it will pick up the first one in the list (I assume). |
Sorry, I'm not using this gem with engines, so I don't know what to expect and what the actual behavior is. I thought it could be related to #172, so I've asked your rails version Also, I don't know how to fix this issue. Given that we cannot have two paths with two different languages, could you please provide:
? |
/cc @rvasquez-flip4new (author of the engine support feature) |
I want to use route translator on both the main app and my engine. But i'm getting the following path with my route helpers: The language is being displayed twice |
What does happen if you remove the localized block inside the engine routes? |
If you remove localized block inside the engine routes, then all routes from engine don't have any |
Thanks for the information. As I mentioned before, I'm not so much into Rails Engines and I don't know how they behave and how route_translator should deal with them. I would like a summary like this: Without route translator
|
Without route translator
Would it be possible to automagically include route translator at Engine level when Rails Engine is mounted inside localized block? Actual Result:
Expected Result:
With route translator
|
So, as far as I understand, if you use route_translator inside your engine and your engine is itself inside a localized block, then: Actual result
Expected result
Am I right? |
Yup, that's correct. |
The current engine implementation is buggy and incomplete. We are going to drop the whole feature, waiting for a new contributor Fixes enriclluelles#166, fixes enriclluelles#172, fixes enriclluelles#173 and fixes enriclluelles#178
Hi,
I'm using
route_translator
v5.5.0 gem and running the following issue. I hope someone can clarify why it's behaving this way.Since I set my default_locale, I would expect it returns
en
, but it returnsde
as locale instead. Any idea how to do proper spec in this scenario?The text was updated successfully, but these errors were encountered: