Skip to content

Commit b9087f9

Browse files
committed
Fixed toplevel constant DateTime referenced by Virtus::Attribute::DateTime
1 parent 5e48701 commit b9087f9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Next Release
22
============
3-
3+
* [#925](https://github.com/intridea/grape/pull/925): Fixed `toplevel constant DateTime referenced by Virtus::Attribute::DateTime` - [@u2](https://github.com/u2).
44
* [#916](https://github.com/intridea/grape/pull/916): Added `DateTime/Date/Numeric/Boolean` type support `allow_blank` - [@u2](https://github.com/u2).
55
* [#871](https://github.com/intridea/grape/pull/871): Fixed `Grape::Middleware::Base#response` - [@galathius](https://github.com/galathius).
66
* [#559](https://github.com/intridea/grape/issues/559): Added support for Rack 1.6.0, which parses requests larger than 128KB - [@myitcv](https://github.com/myitcv).

lib/grape/validations/validators/coerce.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def _valid_single_type?(klass, val)
3232
val.is_a?(TrueClass) || val.is_a?(FalseClass) || (val.is_a?(String) && val.empty?)
3333
elsif klass == Rack::Multipart::UploadedFile
3434
val.is_a?(Hashie::Mash) && val.key?(:tempfile)
35-
elsif [Virtus::Attribute::DateTime, Virtus::Attribute::Date, Virtus::Attribute::Numeric].any?{ |vclass| vclass >= klass }
35+
elsif [DateTime, Date, Numeric].any?{ |vclass| vclass >= klass }
3636
return true if val.is_a?(String) && val.empty?
3737
val.is_a?(klass)
3838
else

0 commit comments

Comments
 (0)