-
-
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
Fix custom validator not ending with _validator #2337
Fix custom validator not ending with _validator #2337
Conversation
Generated by 🚫 Danger |
|
||
RSpec.describe Grape::Validations::Validators::Base do | ||
describe '#inherited' do | ||
# I tried with `Class.new(Grape::Validations::Validators::Base) but `inherited` is not called. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does https://avdi.codes/classnew-and-inherited/ help?
CHANGELOG.md
Outdated
@@ -13,6 +13,7 @@ | |||
#### Fixes | |||
|
|||
* [#2328](https://github.com/ruby-grape/grape/pull/2328): Don't cache Class.instance_methods - [@byroot](https://github.com/byroot). | |||
* [#2337](https://github.com/ruby-grape/grape/pull/2337): Fix custom validator registering - [@ericproulx](https://github.com/ericproulx). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's say "Fix: allow custom validators that do not end with _validator
"?
Hmmmm... this clearly isn't right. |
Update spec comment Add spec for anonymous class
Thanks for fixing this. |
Fix #2336