-
Notifications
You must be signed in to change notification settings - Fork 164
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
Default Locale Slug is emptied, when another Locale has the same value #184
Comments
+1 |
Have created a spec based on my issue description above - it's passing 👍 I should be back in the code base where I was having this issue originally this week so will check in see if it's still a problem and if the spec correctly covers the issue I'm seeing there. |
Ok I can reproduce the error now - I have I18n Fallbacks enabled and this is causing the issue. See my recent commit where all I have done is added a require to "i18n/backend/fallbacks" this is enough to cause a number of specs to fail, in my actual app I also have the fallbacks properly mapped but adding the require here has been enough to cause the issue. If I comment out the following line https://github.com/digitalplaywright/mongoid-slug/blob/master/lib/mongoid/slug.rb#L183 then the new spec passes but others of course fail. |
This is helpful, @wzowee do you think you can turn this into a single failing spec in this project? I mean something we'll be able to commit with a fix? |
I've broken this out into a seperate fallback_spec.rb spec in my fork. However there is an issue where the use of |
I think there's no way to unload something easily without having intimate knowledge of it, but maybe there's a way to do two test runs in Rakefile? Either way we need to understand why it's failing and fix it now :) |
Bump @wzowee I'd like a fix for this still, looks like you got pretty far. |
When creating a document with a localized title and slug based off of this title, if only the english locale value is set first, and then another locale is set with the same value - the english slug value is removed.
This is very similar to an older issue #153 however the flow that surfaces it is.
Some environment versions:
Rails 4.2.0
Ruby 2.1.1p76
mongoid-slug (4.0.0)
The text was updated successfully, but these errors were encountered: