-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
minimum, maximum keys are conflicted with active_support methods. #329
Comments
Hi! I have the same issue after updating rails to 7 version. Is this issue fixed after all? |
Possibly this is related to rails/rails#49457. We should have a fix soon... |
converting to hash working fine, but it's a temporary solution, waiting for the fix, thanks @pkuczynski Settings.length.to_h[:maximum] |
Patch in #342 |
I am not able to work on a fix, but I will happily approve a PR and make a quick release. Any volunteer? |
@pkuczynski hi! I'd like to contribute. First, I need to explore a little bit how the code works and then I can suggest my solution and we can discuss it here |
@pkuczynski pull request is ready for review, I decided to fix it right away as it turned out to be an easy one 😸 |
Merged and published! Thank you @ikael21 |
When upgrading my project to new version of Ruby and Rails, the settings stored with
minimum
andmaximum
keys are now raising errors:~/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4.2/lib/active_support/core_ext/enumerable.rb:44:in
minimum': wrong number of arguments (given 0, expected 1) (ArgumentError)`Ruby version: 3.1.3
Rails version: 7.0.4.2
How to reproduce:
config/settings.yml
with:rails console
, try access the value withSettings.user_limit.minimum
andSettings.user_limit.maximum
Expect: Should be able to access minimum and maximum with corresponding values of 9 and 99
Reality: Error raises
~/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activesupport-7.0.4.2/lib/active_support/core_ext/enumerable.rb:44:in
minimum': wrong number of arguments (given 0, expected 1) (ArgumentError)`The text was updated successfully, but these errors were encountered: