Giter VIP home page Giter VIP logo

Comments (15)

thomasdarde avatar thomasdarde commented on June 25, 2024

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.

yadoga avatar yadoga commented on June 25, 2024

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.

norman avatar norman commented on June 25, 2024

@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.

yadoga avatar yadoga commented on June 25, 2024

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.

thomasdarde avatar thomasdarde commented on June 25, 2024

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.

yadoga avatar yadoga commented on June 25, 2024

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.

norman avatar norman commented on June 25, 2024

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.

parndt avatar parndt commented on June 25, 2024

Does Rails 4.0.1 not fix this issue?

from friendly_id-globalize.

yadoga avatar yadoga commented on June 25, 2024

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.

parndt avatar parndt commented on June 25, 2024

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.

yadoga avatar yadoga commented on June 25, 2024

ok, setting one up.

from friendly_id-globalize.

yadoga avatar yadoga commented on June 25, 2024

Test Case here:
https://github.com/rvrm/Testapp

In this case as "User has_many Pages".

from friendly_id-globalize.

yadoga avatar yadoga commented on June 25, 2024

Outch, too late a night for me. Setting up a real test case now, not only a test app.

from friendly_id-globalize.

yadoga avatar yadoga commented on June 25, 2024

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.

rvrm avatar rvrm commented on June 25, 2024

This seems to be general globalize issue. I added it here: globalize/globalize#303

from friendly_id-globalize.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.