-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Validations Autoload #2207
Validations Autoload #2207
Conversation
Generated by 🚫 Danger |
Thank you! Add to CHANGELOG please? There's a couple of bugs that mention auto-load, does any of this fix that? https://github.com/ruby-grape/grape/issues?q=is%3Aissue+validations+auto-load+is%3Aopen |
I'm not sure it will fix the issues. I think the best way to load any custom validators would be through the Maybe having a lazy load hook would help to clarify when to load custom validators. Something like: # /initializers/grape.rb
ActiveSupport.on_load(:grape). do # would need a
require 'my_custom_validator'
Grape::Validations.register_validator('my_custom_validator', MyCustomValidator)
end |
@ericproulx I think the JRuby failure is related to this:
Check out the truffleruby and irb head failures too, maybe easy to fix. |
I don't recommend doing this while we have the same call in |
This reverts commit 6d417fa.
This reverts commit 6d417fa.
Hello,
I saw that almost all classes/modules were autoloaded but the
Validations
tree wasn't. Anyway, here's a PR with the autoloading. Merry Xmas! 🎄