-
-
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 allow_blank supporting DateTime/Date #916
Conversation
@@ -7,4 +7,5 @@ group :development, :test do | |||
gem 'guard' | |||
gem 'guard-rspec' | |||
gem 'guard-rubocop' | |||
gem 'byebug' |
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.
Remove it, please.
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.
Thank you.I forgot it.
Needs CHANGELOG, too, please. |
Hm... Is Can Which values of |
Before I wrote |
@@ -29,9 +29,12 @@ def _valid_single_type?(klass, val) | |||
# allow nil, to ignore when a parameter is absent | |||
return true if val.nil? | |||
if klass == Virtus::Attribute::Boolean | |||
val.is_a?(TrueClass) || val.is_a?(FalseClass) | |||
val.is_a?(TrueClass) || val.is_a?(FalseClass) || val == '' |
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.
@u2 And here, too?
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.
sorry.Updated again.
Merging, thanks. |
Fix allow_blank supporting DateTime/Date
#915