-
-
Notifications
You must be signed in to change notification settings - Fork 592
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
allow_nil: true
on the find method does not work as expected.
#1001
Comments
It's not in 5.4.2: https://github.com/norman/friendly_id/blob/master/Changelog.md |
Apologies, this is not released yet. |
Version 5.5.0 pushed @xxx please can you try that version? 😄 |
@parndt 5.5.0 is working great. thanks! |
You may want to update the Readme accordingly and prompt users to install ~> 5.5.0. |
yea done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
From the readme, I expect that I should be able to do something like
MyModel.friendly.find('nonexistent-slug', allow_nil: true)
and have the call returnnil
without raising an exception, but when I make this call, I instead getCouldn't find all MyModels with 'id': (nonexistent_slug, {:allow_nil=>true}) (found 0 results, but was looking for 2)
, as if the args are being splatted into a single array of IDs to find.MyModel.friendly.find(id)
withoutallow_nil
works as expected.I'm wondering if this is something to do with the change in how keyword args are handled between Ruby 2 and 3.
FriendlyId: 5.4.2
Ruby: 3.1.2p20
Rails: 7.0.4
The text was updated successfully, but these errors were encountered: