Comments (15)
This is "normal" because find is not surcharged in Friendly ID 5. A proxy must be used like this 👍
User.friendly.find(params[:id])
I don't know if it's working on an association ?
I did have the same problem, and a clear exemple of the new way to use friendly_id-globalize would be much appreciated !
from friendly_id-globalize.
Per the new Friendly_id 5 config file, setting
config.use :finders
is said to activate the :finders method on all models.
Unfortunately the OP's problem persists. Finding through an association seems currently not possible with v5.
@parndt to the rescue.
from friendly_id-globalize.
@yadoga Finding through an association is partly broken because of bugs in Rails 4.0 that will be fixed in 4.0.1. You might want to check and see if the issue described in norman/friendly_id#452 is what's affecting you.
from friendly_id-globalize.
Thanks for your reply @norman. I'm afraid I'm using Rails 4.0.1 here on my end and the problem persists. Maybe you meant the "5.0.1" version of Friendly_id instead?
from friendly_id-globalize.
I believe he meant 5.0.1 wich will depend on 4.0.1
On 4 nov. 2013, at 18:04, yadoga [email protected] wrote:
Thanks for your reply @norman. I'm afraid I'm using Rails 4.0.1 here on my end and the problem persists. Maybe you meant the "5.0.1" version of Friendly_id instead?
—
Reply to this email directly or view it on GitHub.
from friendly_id-globalize.
Norman speaks of Active Record 4.0.1 in the referenced thread above. Curiously it's now out and does not seem to solve the issue. I'd love my friendly_id healthy again. Please please with sugar on top.
from friendly_id-globalize.
Unfortunately I've never used the globalize functionality and for the next several months need to focus on maintaining Haml. I spent about 2 months working on FriendlyId to the exclusion of Haml and now I need to catch up with pending issues and requests over there. @parndt, the primary maintainer of Globalize and its integration with FriendlyId, is busy with work and other high priority open source projects. It would be fantastic if somebody with a little time to spare could give us a hand with this.
from friendly_id-globalize.
Does Rails 4.0.1 not fix this issue?
from friendly_id-globalize.
Hi Philip, glad to see you around! Unfortunately the error persists with Rails 4.0.1. Just double checked this. Finding a translated title through an association still returns 'RecordNotFound' as described in the first comment.
from friendly_id-globalize.
Can anybody make a simple reproducing test case that can be added to the library? This makes it a lot easier to fix. The original post assumes I have a @site
and Page
model already set up.
from friendly_id-globalize.
ok, setting one up.
from friendly_id-globalize.
Test Case here:
https://github.com/rvrm/Testapp
In this case as "User has_many Pages".
from friendly_id-globalize.
Outch, too late a night for me. Setting up a real test case now, not only a test app.
from friendly_id-globalize.
Testing currently gives me other unrelated errors (Gem.source_index, …), so I'm not able to provide a valid test for the moment. Can anybody give a hand here and set one up?
from friendly_id-globalize.
This seems to be general globalize issue. I added it here: globalize/globalize#303
from friendly_id-globalize.
Related Issues (20)
- updating slugs using self.set_friendly_id t.title, t.locale
- disable fallback? HOT 2
- Redirect same page to different language (link_to) HOT 5
- Add to README - Config order is important HOT 9
- Boom HOT 4
- New version on RubyGems HOT 2
- FriendlyId History Support HOT 2
- Best way to update slug? HOT 2
- friendly_id-globalize does not override slug parameter HOT 4
- [attr]_changed? always nil in "should_generate_new_friendly_id?" method HOT 1
- Generator is not working HOT 3
- Bump to new version
- Unique Slugs by Scope not working HOT 1
- everything works perfect on development but not on Heroku HOT 2
- Issue with non-translatable models HOT 1
- Rails 5.2 warnings
- Recreate slugs
- Scope is not applied for new records when history module is enabled
- Create RubyGems release for 1.0.0.alpha4 HOT 2
- Compatibility with Ruby 3.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from friendly_id-globalize.